From 27476a0735be5fcc8232ad8a63c3334a4ffb029e Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 29 Oct 2017 20:19:12 +0100 Subject: [PATCH] lets show Set As and Edit button at videos too, why not --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 -- .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 4 ---- 2 files changed, 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index c405adf05..ae02f2a66 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -233,8 +233,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View menu.apply { findItem(R.id.menu_share_1).isVisible = !config.replaceShare findItem(R.id.menu_share_2).isVisible = config.replaceShare - findItem(R.id.menu_set_as).isVisible = currentMedium.isImage() - findItem(R.id.menu_edit).isVisible = currentMedium.isImage() findItem(R.id.menu_rotate).isVisible = currentMedium.isImage() findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.') diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index c4f8b2e09..46ff5a7cb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -108,8 +108,6 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean { menu.findItem(R.id.cab_rename).isVisible = selectedPositions.size == 1 menu.findItem(R.id.cab_open_with).isVisible = selectedPositions.size == 1 - menu.findItem(R.id.cab_edit).isVisible = isOneImageSelected() - menu.findItem(R.id.cab_set_as).isVisible = isOneImageSelected() menu.findItem(R.id.cab_confirm_selection).isVisible = isPickIntent && allowMultiplePicks && selectedPositions.size > 0 checkHideBtnVisibility(menu) @@ -140,8 +138,6 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0 menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0 } - - private fun isOneImageSelected() = selectedPositions.size == 1 && media.size > selectedPositions.first() && media[selectedPositions.first()].isImage() } private fun confirmSelection() {