feat: ask permission for files on API <29

This commit is contained in:
rebelonion 2024-02-06 21:40:38 -06:00
parent c4630f9243
commit 9bb4c702f3
3 changed files with 33 additions and 3 deletions

View file

@ -39,6 +39,7 @@ import ani.dantotsu.databinding.ActivitySettingsBinding
import ani.dantotsu.download.DownloadedType
import ani.dantotsu.download.DownloadsManager
import ani.dantotsu.download.video.ExoplayerDownloadService
import ani.dantotsu.downloadsPermission
import ani.dantotsu.initActivity
import ani.dantotsu.loadImage
import ani.dantotsu.logger
@ -253,6 +254,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
}
binding.importExportSettings.setOnClickListener {
downloadsPermission(this)
val selectedArray = mutableListOf(false)
val filteredLocations = Location.entries.filter { it.exportable }
selectedArray.addAll(List(filteredLocations.size - 1) { false })