aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-05-31 01:31:02 -0700
committerAllan Wang <me@allanwang.ca>2017-05-31 01:31:02 -0700
commit9a41937a33539dbfaae4d072361caaec79865c29 (patch)
treece647730eef90b02cb5f4612cf0e37a935500c50 /app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
parentc53e343f039b65c0aee2ee316b8c844a5b596bb8 (diff)
downloadfrost-9a41937a33539dbfaae4d072361caaec79865c29.tar.gz
frost-9a41937a33539dbfaae4d072361caaec79865c29.tar.bz2
frost-9a41937a33539dbfaae4d072361caaec79865c29.zip
implement cache db and start js injections
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
index 2ac58113..52a75929 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
@@ -25,8 +25,9 @@ object Prefs {
get() = sp.getLong(LAST_ACTIVE, -1)
set(value) = set(LAST_ACTIVE, System.currentTimeMillis())
- var userId: Int
- get() = sp.getInt(USER_ID, -1)
+ const val userIdDefault = -1L
+ var userId: Long
+ get() = sp.getLong(USER_ID, userIdDefault)
set(value) = set(USER_ID, value)
private fun set(key: String, value: Boolean) = sp.edit().putBoolean(key, value).apply()