diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index ca21c8bca..5f16757b6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -160,8 +160,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { media_empty_text_placeholder_2.setTextColor(getAdjustedPrimaryColor()) if (mMedia.isEmpty() || config.getFolderSorting(mPath) and SORT_BY_RANDOM == 0) { - handleLockedFolderOpening(mPath) { - if (it) { + handleLockedFolderOpening(mPath) { success -> + if (success) { tryLoadGallery() } else { finish() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 351e4fa71..712f45fe6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -308,8 +308,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View showSystemUI(true) - handleLockedFolderOpening(mPath.getParentPath()) { - if (it) { + handleLockedFolderOpening(mPath.getParentPath()) { success -> + if (success) { initContinue() } else { finish()