aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-28 11:08:47 -0700
committerAllan Wang <me@allanwang.ca>2019-07-28 11:08:47 -0700
commit4744662f5cbd1d40b91503ab4242ff5b9f423d9d (patch)
treebc85f62926d40bea7e93ed2992edf072de78026a
parent65ad23e07634f2a1605dcc7768488d933a0aa6fb (diff)
downloadfrost-4744662f5cbd1d40b91503ab4242ff5b9f423d9d.tar.gz
frost-4744662f5cbd1d40b91503ab4242ff5b9f423d9d.tar.bz2
frost-4744662f5cbd1d40b91503ab4242ff5b9f423d9d.zip
Init bugsnag after pref setup
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt26
1 files changed, 15 insertions, 11 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index a465eb7b..65c6d463 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -84,22 +84,13 @@ class FrostApp : Application() {
.withDatabase(NotificationDb.NAME, NotificationDb::class)
.build()
)
- Showcase.initialize(this, "${BuildConfig.APPLICATION_ID}.showcase")
- Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
// if (LeakCanary.isInAnalyzerProcess(this)) return
// refWatcher = LeakCanary.install(this)
+ initPrefs()
initBugsnag()
- KL.shouldLog = { BuildConfig.DEBUG }
- Prefs.verboseLogging = false
+
L.i { "Begin Frost for Facebook" }
FrostPglAdBlock.init(this)
- if (Prefs.installDate == -1L) {
- Prefs.installDate = System.currentTimeMillis()
- }
- if (Prefs.identifier == -1) {
- Prefs.identifier = Random().nextInt(Int.MAX_VALUE)
- }
- Prefs.lastLaunch = System.currentTimeMillis()
super.onCreate()
@@ -150,6 +141,19 @@ class FrostApp : Application() {
}
}
+ private fun initPrefs() {
+ Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
+ KL.shouldLog = { BuildConfig.DEBUG }
+ Prefs.verboseLogging = false
+ if (Prefs.installDate == -1L) {
+ Prefs.installDate = System.currentTimeMillis()
+ }
+ if (Prefs.identifier == -1) {
+ Prefs.identifier = Random().nextInt(Int.MAX_VALUE)
+ }
+ Prefs.lastLaunch = System.currentTimeMillis()
+ }
+
private fun initBugsnag() {
if (BuildConfig.DEBUG) {
return