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 31c46723f..94e62b028 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 @@ -716,7 +716,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun createShortcut() { - if (!isOreoPlus()) return + if (!isOreoPlus()) { + return + } val manager = getSystemService(ShortcutManager::class.java) if (manager.isRequestPinShortcutSupported) { val medium = getCurrentMedium() ?: return diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index b54c3c2bd..914150121 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -549,7 +549,9 @@ class DirectoryAdapter( } private fun createShortcut() { - if (!isOreoPlus()) return + if (!isOreoPlus()) { + return + } val manager = activity.getSystemService(ShortcutManager::class.java) if (manager.isRequestPinShortcutSupported) { val dir = getFirstSelectedItem() ?: return diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 65e409dca..059cfcf23 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -386,7 +386,9 @@ class MediaAdapter( } private fun createShortcut() { - if (!isOreoPlus()) return + if (!isOreoPlus()) { + return + } val manager = activity.getSystemService(ShortcutManager::class.java) if (manager.isRequestPinShortcutSupported) { val path = getSelectedPaths().first()