From 2d3cc070ae1374f4ff25ddd89850a5ee9885f9b9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 7 Aug 2018 12:42:13 +0200 Subject: [PATCH] remove the Replace Deep Zoomable images... option --- .../gallery/activities/SettingsActivity.kt | 9 -------- .../gallery/activities/ViewPagerActivity.kt | 14 ----------- .../gallery/extensions/Activity.kt | 1 - .../gallery/helpers/Config.kt | 4 ---- .../gallery/helpers/Constants.kt | 1 - app/src/main/res/layout/activity_settings.xml | 23 ------------------- 6 files changed, 52 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 13a79370e..4382254e6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -68,7 +68,6 @@ class SettingsActivity : SimpleActivity() { setupEnablePullToRefresh() setupOneFingerZoom() setupAllowInstantChange() - setupReplaceZoomableImages() setupShowExtendedDetails() setupHideExtendedDetails() setupManageExtendedDetails() @@ -351,14 +350,6 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupReplaceZoomableImages() { - settings_replace_zoomable_images.isChecked = config.replaceZoomableImages - settings_replace_zoomable_images_holder.setOnClickListener { - settings_replace_zoomable_images.toggle() - config.replaceZoomableImages = settings_replace_zoomable_images.isChecked - } - } - private fun setupShowExtendedDetails() { settings_show_extended_details.isChecked = config.showExtendedDetails settings_show_extended_details_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 149fd53eb..c59f342be 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -70,7 +70,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private var mAreSlideShowMediaVisible = false private var mIsOrientationLocked = false - private var mStoredReplaceZoomableImages = false private var mMediaFiles = ArrayList() private var mFavoritePaths = ArrayList() @@ -93,7 +92,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } } - storeStateVariables() initFavorites() } @@ -113,11 +111,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View setTranslucentNavigation() } - if (mStoredReplaceZoomableImages != config.replaceZoomableImages) { - mPrevHashcode = 0 - refreshViewPager() - } - initBottomActions() supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background)) @@ -138,7 +131,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View override fun onPause() { super.onPause() stopSlideshow() - storeStateVariables() } override fun onDestroy() { @@ -357,12 +349,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View return true } - private fun storeStateVariables() { - config.apply { - mStoredReplaceZoomableImages = replaceZoomableImages - } - } - private fun updatePagerItems(media: MutableList) { val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, media) if (!isActivityDestroyed()) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index d004ee1ea..0aee81bfe 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -73,7 +73,6 @@ fun SimpleActivity.launchAbout() { FAQItem(R.string.faq_6_title, R.string.faq_6_text), FAQItem(R.string.faq_7_title, R.string.faq_7_text), FAQItem(R.string.faq_8_title, R.string.faq_8_text), - FAQItem(R.string.faq_9_title, R.string.faq_9_text), FAQItem(R.string.faq_10_title, R.string.faq_10_text), FAQItem(R.string.faq_11_title, R.string.faq_11_text), FAQItem(R.string.faq_12_title, R.string.faq_12_text), 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 ff80bbe58..7b2c2ec0c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -189,10 +189,6 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(ALLOW_INSTANT_CHANGE, false) set(allowInstantChange) = prefs.edit().putBoolean(ALLOW_INSTANT_CHANGE, allowInstantChange).apply() - var replaceZoomableImages: Boolean - get() = prefs.getBoolean(REPLACE_ZOOMABLE_IMAGES, false) - set(replaceZoomableImages) = prefs.edit().putBoolean(REPLACE_ZOOMABLE_IMAGES, replaceZoomableImages).apply() - private fun getDirectoryColumnsField(): String { val isPortrait = context.resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT return if (isPortrait) { 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 0a74ddbd3..afc60897d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -45,7 +45,6 @@ const val EXTENDED_DETAILS = "extended_details" const val HIDE_EXTENDED_DETAILS = "hide_extended_details" const val ONE_FINGER_ZOOM = "one_finger_zoom" const val ALLOW_INSTANT_CHANGE = "allow_instant_change" -const val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images" const val DO_EXTRA_CHECK = "do_extra_check" const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock" const val LAST_FILEPICKER_PATH = "last_filepicker_path" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 822fc4989..91b986b1d 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -625,29 +625,6 @@ - - - - - -