Remove lateinit from Application class

Just stumbled in this lateinit and thought we could just get rid of it.
This commit is contained in:
Marco Romano 2023-11-14 15:32:18 +01:00 committed by GitHub
parent 2c25e69df8
commit a5f76da204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,14 +27,10 @@ import io.element.android.x.initializer.TracingInitializer
class ElementXApplication : Application(), DaggerComponentOwner {
private lateinit var appComponent: AppComponent
override val daggerComponent: Any
get() = appComponent
override val daggerComponent: AppComponent = DaggerAppComponent.factory().create(this)
override fun onCreate() {
super.onCreate()
appComponent = DaggerAppComponent.factory().create(applicationContext)
AppInitializer.getInstance(this).apply {
initializeComponent(CrashInitializer::class.java)
initializeComponent(TracingInitializer::class.java)