adding some Snooze time related shared prefs things

This commit is contained in:
tibbi 2018-03-06 20:03:59 +01:00
parent 0326f6c860
commit be2bbb83c4
2 changed files with 10 additions and 0 deletions

View file

@ -199,4 +199,12 @@ open class BaseConfig(val context: Context) {
var wasReminderWarningShown: Boolean
get() = prefs.getBoolean(WAS_REMINDER_WARNING_SHOWN, false)
set(wasReminderWarningShown) = prefs.edit().putBoolean(WAS_REMINDER_WARNING_SHOWN, wasReminderWarningShown).apply()
var useSameSnooze: Boolean
get() = prefs.getBoolean(USE_SAME_SNOOZE, true)
set(useSameSnooze) = prefs.edit().putBoolean(USE_SAME_SNOOZE, useSameSnooze).apply()
var snoozeTime: Int
get() = prefs.getInt(SNOOZE_TIME, 10)
set(snoozeDelay) = prefs.edit().putInt(SNOOZE_TIME, snoozeDelay).apply()
}

View file

@ -58,6 +58,8 @@ const val USE_24_HOUR_FORMAT = "use_24_hour_format"
const val SUNDAY_FIRST = "sunday_first"
const val WAS_ALARM_WARNING_SHOWN = "was_alarm_warning_shown"
const val WAS_REMINDER_WARNING_SHOWN = "was_reminder_warning_shown"
const val USE_SAME_SNOOZE = "use_same_snooze"
const val SNOOZE_TIME = "snooze_delay"
// licenses
const val LICENSE_KOTLIN = 1