mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix timeout switch
This commit is contained in:
@@ -125,6 +125,7 @@ class DurationDialogFragmentCompat : InputPreferenceDialogFragmentCompat() {
|
||||
}
|
||||
}
|
||||
|
||||
mEnabled = isSwitchActivated()
|
||||
setSwitchAction({ isChecked ->
|
||||
mEnabled = isChecked
|
||||
}, mDays + mHours + mMinutes + mSeconds > 0)
|
||||
|
||||
@@ -155,6 +155,10 @@ abstract class InputPreferenceDialogFragmentCompat : PreferenceDialogFragmentCom
|
||||
}
|
||||
}
|
||||
|
||||
fun isSwitchActivated(): Boolean {
|
||||
return switchElementView?.isChecked == true
|
||||
}
|
||||
|
||||
fun activateSwitch() {
|
||||
if (switchElementView?.isChecked != true)
|
||||
switchElementView?.isChecked = true
|
||||
|
||||
Reference in New Issue
Block a user