From ffb1f7368ba67ee6754bf453b148aa123e0aa66c Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Tue, 18 May 2021 17:41:09 +0200 Subject: [PATCH] removing some redundant code --- .../filemanager/pro/activities/SettingsActivity.kt | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt index ff692f1f..e13c8a29 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt @@ -119,21 +119,11 @@ class SettingsActivity : SimpleActivity() { private fun setupPressBackTwice() { settings_press_back_twice.isChecked = config.pressBackTwice settings_press_back_twice_holder.setOnClickListener { - if (config.pressBackTwice) { - togglePressBackTwice() - } else { - handleHiddenFolderPasswordProtection { - togglePressBackTwice() - } - } + settings_press_back_twice.toggle() + config.pressBackTwice = settings_press_back_twice.isChecked } } - private fun togglePressBackTwice() { - settings_press_back_twice.toggle() - config.pressBackTwice = settings_press_back_twice.isChecked - } - private fun setupHiddenItemPasswordProtection() { settings_password_protection.isChecked = config.isHiddenPasswordProtectionOn settings_password_protection_holder.setOnClickListener {