From 38397a71dd012450b9d6e6aeb136bda7b6a9d831 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 17 Jun 2018 15:52:18 +0200 Subject: [PATCH] remove the option for replacing Share with Rotate at the fullscreen view --- .../gallery/activities/SettingsActivity.kt | 9 -------- .../gallery/activities/ViewPagerActivity.kt | 5 +--- .../gallery/helpers/Config.kt | 4 ---- .../gallery/helpers/Constants.kt | 1 - app/src/main/res/layout/activity_settings.xml | 23 ------------------- app/src/main/res/menu/menu_viewpager.xml | 8 +------ 6 files changed, 2 insertions(+), 48 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt index d010bbc5e..197d2071a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -51,7 +51,6 @@ class SettingsActivity : SimpleActivity() { setupScrollHorizontally() setupScreenRotation() setupHideSystemUI() - setupReplaceShare() setupPasswordProtection() setupAppPasswordProtection() setupDeleteEmptyFolders() @@ -220,14 +219,6 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupReplaceShare() { - settings_replace_share.isChecked = config.replaceShare - settings_replace_share_holder.setOnClickListener { - settings_replace_share.toggle() - config.replaceShare = settings_replace_share.isChecked - } - } - private fun setupPasswordProtection() { settings_password_protection.isChecked = config.isPasswordProtectionOn settings_password_protection_holder.setOnClickListener { 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 14b69e3be..f681de3e8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -275,8 +275,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val currentMedium = getCurrentMedium() ?: return true menu.apply { - findItem(R.id.menu_share_1).isVisible = !config.replaceShare - findItem(R.id.menu_share_2).isVisible = config.replaceShare findItem(R.id.menu_rotate).isVisible = currentMedium.isImage() findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0 findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.') @@ -306,8 +304,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View R.id.menu_open_with -> openPath(getCurrentPath(), true) R.id.menu_hide -> toggleFileVisibility(true) R.id.menu_unhide -> toggleFileVisibility(false) - R.id.menu_share_1 -> shareMedium(getCurrentMedium()!!) - R.id.menu_share_2 -> shareMedium(getCurrentMedium()!!) + R.id.menu_share -> shareMedium(getCurrentMedium()!!) R.id.menu_delete -> checkDeleteConfirmation() R.id.menu_rename -> renameFile() R.id.menu_edit -> openEditor(getCurrentPath()) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt index 97e9e534e..73d6db933 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -227,10 +227,6 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(HIDE_SYSTEM_UI, false) set(hideSystemUI) = prefs.edit().putBoolean(HIDE_SYSTEM_UI, hideSystemUI).apply() - var replaceShare: Boolean - get() = prefs.getBoolean(REPLACE_SHARE_WITH_ROTATE, false) - set(replaceShare) = prefs.edit().putBoolean(REPLACE_SHARE_WITH_ROTATE, replaceShare).apply() - var deleteEmptyFolders: Boolean get() = prefs.getBoolean(DELETE_EMPTY_FOLDERS, false) set(deleteEmptyFolders) = prefs.edit().putBoolean(DELETE_EMPTY_FOLDERS, deleteEmptyFolders).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index 902a005c9..9c9d0b018 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -30,7 +30,6 @@ const val EXCLUDED_FOLDERS = "excluded_folders" const val INCLUDED_FOLDERS = "included_folders" const val ALBUM_COVERS = "album_covers" const val HIDE_SYSTEM_UI = "hide_system_ui" -const val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate" const val DELETE_EMPTY_FOLDERS = "delete_empty_folders" const val ALLOW_PHOTO_GESTURES = "allow_photo_gestures" const val ALLOW_VIDEO_GESTURES = "allow_video_gestures" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index ef0dc36d2..94cc6ea57 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -557,29 +557,6 @@ - - - - - - @@ -34,12 +34,6 @@ android:title="@string/rotate_one_eighty"/> -