From c7f57842c86332a0df1c938b6c2f2fd8a8227e62 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 1 Apr 2019 18:50:24 +0200 Subject: [PATCH] show the Upgrading from Free dialog only after granding write permissions --- .../gallery/pro/activities/MainActivity.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index cac452841..ba2807965 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -151,11 +151,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { updateWidgets() registerFileUpdateListener() - - if (!config.wasUpgradedFromFreeShown && isPackageInstalled("com.simplemobiletools.gallery")) { - ConfirmationDialog(this, "", R.string.upgraded_from_free, R.string.ok, 0) {} - config.wasUpgradedFromFreeShown = true - } } override fun onStart() { @@ -435,6 +430,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun tryLoadGallery() { handlePermission(PERMISSION_WRITE_STORAGE) { if (it) { + if (!config.wasUpgradedFromFreeShown && isPackageInstalled("com.simplemobiletools.gallery")) { + ConfirmationDialog(this, "", R.string.upgraded_from_free, R.string.ok, 0) {} + config.wasUpgradedFromFreeShown = true + } + checkOTGPath() checkDefaultSpamFolders()