diff options
author | Allan Wang <me@allanwang.ca> | 2018-04-07 14:41:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-07 14:41:28 -0400 |
commit | 6943976bf150c723cd55cbfb145257ce14471f91 (patch) | |
tree | ffc05cb1385e66daed29c728f417b74e0f091ea1 /app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt | |
parent | 7c1671f34328c509cf9850331225f8e4705e4abf (diff) | |
download | frost-6943976bf150c723cd55cbfb145257ce14471f91.tar.gz frost-6943976bf150c723cd55cbfb145257ce14471f91.tar.bz2 frost-6943976bf150c723cd55cbfb145257ce14471f91.zip |
Fix useragent update (#845)
* Test windows user agent
* Update dependencies
* Update KAU
* Switch back user agent and use android base
* Fix lint issues
* Fix lint part 2
* Test messenger user agent
* Update bugsnag release levels
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index 118f7eac..cbb3d0ab 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -68,10 +68,18 @@ class FrostApp : Application() { // refWatcher = LeakCanary.install(this) if (!BuildConfig.DEBUG) { Bugsnag.init(this) - Bugsnag.setAutoCaptureSessions(true) - Bugsnag.getClient().setUserId(Prefs.frostId) + val releaseStage = setOf("production", "releaseTest", "github", "release") + Bugsnag.setNotifyReleaseStages(*releaseStage.toTypedArray(), "unnamed") + val versionSegments = BuildConfig.VERSION_NAME.split("_") + if (versionSegments.size > 1) { + Bugsnag.setAppVersion(versionSegments.first()) + Bugsnag.setReleaseStage(if (versionSegments.last() in releaseStage) versionSegments.last() + else "unnamed") + Bugsnag.setUserName(BuildConfig.VERSION_NAME) + } -// setUser("userId", "user@email.com", "User Name") + Bugsnag.setAutoCaptureSessions(true) + Bugsnag.setUserId(Prefs.frostId) } KL.shouldLog = { BuildConfig.DEBUG } Prefs.verboseLogging = false |