Skip to content

Commit

Permalink
Change MainApplication instance init spot
Browse files Browse the repository at this point in the history
There was crashes that were seemingly caused by
boot fragment calling the mainApplication instance
before the value for the INSTANCE was set, so
this pr moves the initialisation of the instance
to the earlies spot in the onCreate.

As we were unable to recreate the crash, and the crash
was most likely invisible to the user, there was no
way to verify that this fixes the error.

REF: EKIRJASTO-68
  • Loading branch information
natlibfi-burger committed Oct 22, 2024
1 parent 1d48990 commit cab1179
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class MainApplication : Application() {
override fun onCreate() {
super.onCreate()

INSTANCE = this
MainLogging.configure(cacheDir)

AppInfoUtil.init(this)
Expand All @@ -68,7 +69,6 @@ class MainApplication : Application() {
this.logStartup()
MainTransifex.configure(this.applicationContext)
this.boot.start(this)
INSTANCE = this
}

private fun logStartup() {
Expand Down

0 comments on commit cab1179

Please sign in to comment.