1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-09-20 07:31:40 +02:00

Init bugsnag after pref setup

This commit is contained in:
Allan Wang 2019-07-28 11:08:47 -07:00
parent 65ad23e076
commit 4744662f5c
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56

View File

@ -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