aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt9
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/ReleasePrefs.kt13
3 files changed, 22 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt
index 0cb57ed5..7909f125 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt
@@ -15,4 +15,11 @@ const val REQUEST_TEXT_ZOOM = 1 shl 14
const val REQUEST_NAV = 1 shl 15
const val REQUEST_SEARCH = 1 shl 16
-const val MAIN_TIMEOUT_DURATION = 30 * 60 * 1000 // 30 min \ No newline at end of file
+const val MAIN_TIMEOUT_DURATION = 30 * 60 * 1000 // 30 min
+
+// Flavours
+const val FLAVOUR_PRODUCTION = "production"
+const val FLAVOUR_TEST = "releaseTest"
+const val FLAVOUR_GITHUB = "github"
+const val FLAVOUR_RELEASE = "release"
+const val FLAVOUR_UNNAMED = "unnamed" \ No newline at end of file
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 95a5f39b..59112e70 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
@@ -137,7 +137,7 @@ object Prefs : KPref() {
var verboseLogging: Boolean by kpref("verbose_logging", false)
- var analytics: Boolean by kpref("analytics", false)
+ var analytics: Boolean by kpref("analytics", true)
var overlayEnabled: Boolean by kpref("overlay_enabled", true)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/ReleasePrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/ReleasePrefs.kt
new file mode 100644
index 00000000..1e9dd763
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/ReleasePrefs.kt
@@ -0,0 +1,13 @@
+package com.pitchedapps.frost.utils
+
+import ca.allanwang.kau.kpref.KPref
+import ca.allanwang.kau.kpref.kpref
+import com.pitchedapps.frost.BuildConfig
+
+/**
+ * Created by Allan Wang on 07/04/18.
+ */
+object ReleasePrefs : KPref() {
+ var lastTimeStamp: Long by kpref("last_time_stamp", -1L)
+ var enableUpdater: Boolean by kpref("enable_updater", BuildConfig.FLAVOR == FLAVOUR_GITHUB)
+} \ No newline at end of file