show Manage Included Folders without proper permissions too
This commit is contained in:
parent
d0b903862a
commit
87b7b817a8
2 changed files with 12 additions and 3 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 -> }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue