save last used stroboscope frequency

This commit is contained in:
tibbi
2018-04-05 13:31:33 +02:00
parent 687dbe5e56
commit 8c7cbd7f3a
4 changed files with 23 additions and 9 deletions

View File

@ -19,4 +19,12 @@ class Config(context: Context) : BaseConfig(context) {
var turnFlashlightOn: Boolean
get() = prefs.getBoolean(TURN_FLASHLIGHT_ON, false)
set(turnFlashlightOn) = prefs.edit().putBoolean(TURN_FLASHLIGHT_ON, turnFlashlightOn).apply()
var stroboscopeProgress: Int
get() = prefs.getInt(STROBOSCOPE_PROGRESS, 1000)
set(stroboscopeProgress) = prefs.edit().putInt(STROBOSCOPE_PROGRESS, stroboscopeProgress).apply()
var stroboscopeFrequency: Long
get() = prefs.getLong(STROBOSCOPE_FREQUENCY, 1000L)
set(stroboscopeFrequency) = prefs.edit().putLong(STROBOSCOPE_FREQUENCY, stroboscopeFrequency).apply()
}