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,9 +190,18 @@ class SettingsActivity : SimpleActivity() {
)
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 {
startActivity(Intent(this, IncludedFoldersActivity::class.java))
if (isRPlus() && !isExternalStorageManager()) {
GrantAllFilesDialog(this)
} else {
startActivity(Intent(this, IncludedFoldersActivity::class.java))
}
}
}

View file

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