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 90d71645a..9234794c1 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 @@ -66,6 +66,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private var mWasProtectionHandled = false private var mShouldStopFetching = false private var mIsSearchOpen = false + private var mWasDefaultFolderChecked = false private var mLatestMediaId = 0L private var mLatestMediaDateId = 0L private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation @@ -92,8 +93,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { appLaunched(BuildConfig.APPLICATION_ID) if (savedInstanceState == null) { - openDefaultFolder() - config.temporarilyShowHidden = false config.tempSkipDeleteConfirmation = false removeTempFolder() @@ -436,6 +435,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun tryLoadGallery() { handlePermission(PERMISSION_WRITE_STORAGE) { if (it) { + if (!mWasDefaultFolderChecked) { + openDefaultFolder() + mWasDefaultFolderChecked = true + } + if (!config.wasUpgradedFromFreeShown && isPackageInstalled("com.simplemobiletools.gallery")) { ConfirmationDialog(this, "", R.string.upgraded_from_free, R.string.ok, 0) {} config.wasUpgradedFromFreeShown = true