mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-17 04:10:39 +01:00
removing some redundant code
This commit is contained in:
parent
78e5ed3b5c
commit
ffb1f7368b
@ -119,20 +119,10 @@ 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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun togglePressBackTwice() {
|
||||
settings_press_back_twice.toggle()
|
||||
config.pressBackTwice = settings_press_back_twice.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupHiddenItemPasswordProtection() {
|
||||
settings_password_protection.isChecked = config.isHiddenPasswordProtectionOn
|
||||
|
Loading…
x
Reference in New Issue
Block a user