allow toggling vibrations and popups on key presses

This commit is contained in:
tibbi
2022-01-26 22:21:50 +01:00
parent 247ed0607d
commit 31ea72638c
6 changed files with 61 additions and 18 deletions

View File

@ -8,7 +8,11 @@ class Config(context: Context) : BaseConfig(context) {
fun newInstance(context: Context) = Config(context)
}
var showClipboard: Boolean
get() = prefs.getBoolean(SHOW_CLIPBOARD, true)
set(showClipboard) = prefs.edit().putBoolean(SHOW_CLIPBOARD, showClipboard).apply()
var vibrateOnKeypress: Boolean
get() = prefs.getBoolean(VIBRATE_ON_KEYPRESS, true)
set(vibrateOnKeypress) = prefs.edit().putBoolean(VIBRATE_ON_KEYPRESS, vibrateOnKeypress).apply()
var showPopupOnKeypress: Boolean
get() = prefs.getBoolean(SHOW_POPUP_ON_KEYPRESS, true)
set(showPopupOnKeypress) = prefs.edit().putBoolean(SHOW_POPUP_ON_KEYPRESS, showPopupOnKeypress).apply()
}