From cb34c4349bb35b6e65188a95f95b0d61bb2f0c6b Mon Sep 17 00:00:00 2001 From: Helle <54167962+Helle-Daryd@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:06:33 +0200 Subject: [PATCH] Fixed the image loading We are now requesting the correct permission on for Android sdk level 33 and above. --- app/src/main/AndroidManifest.xml | 3 ++- app/src/main/java/com/orgzly/android/util/AppPermissions.kt | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4242e8453..1f46ad192 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,7 +12,8 @@ - + + diff --git a/app/src/main/java/com/orgzly/android/util/AppPermissions.kt b/app/src/main/java/com/orgzly/android/util/AppPermissions.kt index 426fa497e..0e7d05da5 100644 --- a/app/src/main/java/com/orgzly/android/util/AppPermissions.kt +++ b/app/src/main/java/com/orgzly/android/util/AppPermissions.kt @@ -70,7 +70,10 @@ object AppPermissions { Usage.BOOK_EXPORT -> Manifest.permission.WRITE_EXTERNAL_STORAGE Usage.SYNC_START -> Manifest.permission.WRITE_EXTERNAL_STORAGE Usage.SAVED_SEARCHES_EXPORT_IMPORT -> Manifest.permission.WRITE_EXTERNAL_STORAGE - Usage.EXTERNAL_FILES_ACCESS -> Manifest.permission.READ_EXTERNAL_STORAGE + Usage.EXTERNAL_FILES_ACCESS -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) + Manifest.permission.READ_MEDIA_IMAGES + else + Manifest.permission.READ_EXTERNAL_STORAGE Usage.POST_NOTIFICATIONS -> Manifest.permission.POST_NOTIFICATIONS } }