show Manage Included Folders without proper permissions too

This commit is contained in:
tibbi 2023-01-21 18:54:35 +01:00
parent d0b903862a
commit 87b7b817a8
2 changed files with 12 additions and 3 deletions

View file

@ -190,11 +190,20 @@ class SettingsActivity : SimpleActivity() {
) )
private fun setupManageIncludedFolders() { private fun setupManageIncludedFolders() {
settings_manage_included_folders_holder.beGoneIf(isRPlus() && !isExternalStorageManager()) if (isRPlus() && !isExternalStorageManager()) {
settings_manage_included_folders.text = "${getString(R.string.manage_included_folders)} (${getString(R.string.no_permission)})"
} else {
settings_manage_included_folders.setText(R.string.manage_included_folders)
}
settings_manage_included_folders_holder.setOnClickListener { settings_manage_included_folders_holder.setOnClickListener {
if (isRPlus() && !isExternalStorageManager()) {
GrantAllFilesDialog(this)
} else {
startActivity(Intent(this, IncludedFoldersActivity::class.java)) startActivity(Intent(this, IncludedFoldersActivity::class.java))
} }
} }
}
private fun setupManageExcludedFolders() { private fun setupManageExcludedFolders() {
settings_manage_excluded_folders_holder.setOnClickListener { settings_manage_excluded_folders_holder.setOnClickListener {

View file

@ -19,7 +19,7 @@ class GrantAllFilesDialog(val activity: BaseSimpleActivity) {
.setPositiveButton(R.string.ok) { dialog, which -> activity.launchGrantAllFilesIntent() } .setPositiveButton(R.string.ok) { dialog, which -> activity.launchGrantAllFilesIntent() }
.setNegativeButton(R.string.cancel, null) .setNegativeButton(R.string.cancel, null)
.apply { .apply {
activity.setupDialogStuff(view, this, cancelOnTouchOutside = false) { alertDialog -> } activity.setupDialogStuff(view, this) { alertDialog -> }
} }
} }
} }