From 81f61af5a799ae69f0c89e097bb6b1ea0de2e84b Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 9 May 2019 09:39:02 +0200 Subject: [PATCH] allow creating desktop shortcuts only from Android 8 --- .../gallery/pro/activities/ViewPagerActivity.kt | 2 +- .../gallery/pro/adapters/DirectoryAdapter.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 9f5be1654..0900b0808 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 @@ -164,7 +164,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View findItem(R.id.menu_add_to_favorites).isVisible = !currentMedium.isFavorite && visibleBottomActions and BOTTOM_ACTION_TOGGLE_FAVORITE == 0 findItem(R.id.menu_remove_from_favorites).isVisible = currentMedium.isFavorite && visibleBottomActions and BOTTOM_ACTION_TOGGLE_FAVORITE == 0 findItem(R.id.menu_restore_file).isVisible = currentMedium.path.startsWith(recycleBinPath) - findItem(R.id.menu_create_shortcut).isVisible = isNougatMR1Plus() + findItem(R.id.menu_create_shortcut).isVisible = isOreoPlus() findItem(R.id.menu_change_orientation).isVisible = rotationDegrees == 0 && visibleBottomActions and BOTTOM_ACTION_CHANGE_ORIENTATION == 0 findItem(R.id.menu_change_orientation).icon = resources.getDrawable(getChangeOrientationIcon()) findItem(R.id.menu_rotate).setShowAsAction( 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 1392ec413..705ee2664 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 @@ -17,7 +17,7 @@ import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.dialogs.RenameItemDialog import com.simplemobiletools.commons.dialogs.RenameItemsDialog import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.isNougatMR1Plus +import com.simplemobiletools.commons.helpers.isOreoPlus import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.views.FastScroller import com.simplemobiletools.commons.views.MyRecyclerView @@ -82,7 +82,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList