feat: changing the downloads dir

This commit is contained in:
rebelonion
2024-04-04 02:21:43 -05:00
parent 79113cb04a
commit 33ed647832
8 changed files with 133 additions and 53 deletions

View File

@@ -62,8 +62,11 @@ class StoragePermissions {
}
fun AppCompatActivity.accessAlertDialog(launcher: LauncherWrapper,
complete: (Boolean) -> Unit) {
if (PrefManager.getVal<String>(PrefName.DownloadsDir).isNotEmpty()) {
force: Boolean = false,
complete: (Boolean) -> Unit
) {
if ((PrefManager.getVal<String>(PrefName.DownloadsDir).isNotEmpty() || hasDirAccess(this)) && !force) {
complete(true)
return
}
val builder = AlertDialog.Builder(this, R.style.MyPopup)