mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
wip3
This commit is contained in:
@ -5,7 +5,6 @@ import com.simplemobiletools.commons.extensions.getDefaultAlarmTitle
|
||||
import com.simplemobiletools.commons.extensions.getDefaultAlarmUri
|
||||
import com.simplemobiletools.commons.helpers.ALARM_SOUND_TYPE_ALARM
|
||||
import com.simplemobiletools.commons.helpers.BaseConfig
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class Config(context: Context) : BaseConfig(context) {
|
||||
companion object {
|
||||
@ -28,9 +27,13 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
get() = prefs.getInt(TIMER_SECONDS, 300)
|
||||
set(lastTimerSeconds) = prefs.edit().putInt(TIMER_SECONDS, lastTimerSeconds).apply()
|
||||
|
||||
var timerTimeStamp: Long
|
||||
get() = prefs.getLong(TIMER_TIMESTAMP, System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(timerSeconds.toLong()))
|
||||
set(timestamp) = prefs.edit().putLong(TIMER_TIMESTAMP, timestamp).apply()
|
||||
var timerStartStamp: Long
|
||||
get() = prefs.getLong(TIMER_START_TIMESTAMP, 0L)
|
||||
set(timestamp) = prefs.edit().putLong(TIMER_START_TIMESTAMP, timestamp).apply()
|
||||
|
||||
var timerTickStamp: Long
|
||||
get() = prefs.getLong(TIMER_TICK_TIMESTAMP, 0L)
|
||||
set(timestamp) = prefs.edit().putLong(TIMER_TICK_TIMESTAMP, timestamp).apply()
|
||||
|
||||
var timerVibrate: Boolean
|
||||
get() = prefs.getBoolean(TIMER_VIBRATE, false)
|
||||
|
Reference in New Issue
Block a user