Remove lateinit from Application class
Just stumbled in this lateinit and thought we could just get rid of it.
This commit is contained in:
parent
eca784ce57
commit
d4a152bd47
1 changed files with 1 additions and 5 deletions
|
|
@ -27,14 +27,10 @@ import io.element.android.x.initializer.TracingInitializer
|
||||||
|
|
||||||
class ElementXApplication : Application(), DaggerComponentOwner {
|
class ElementXApplication : Application(), DaggerComponentOwner {
|
||||||
|
|
||||||
private lateinit var appComponent: AppComponent
|
override val daggerComponent: AppComponent = DaggerAppComponent.factory().create(this)
|
||||||
|
|
||||||
override val daggerComponent: Any
|
|
||||||
get() = appComponent
|
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
appComponent = DaggerAppComponent.factory().create(applicationContext)
|
|
||||||
AppInitializer.getInstance(this).apply {
|
AppInitializer.getInstance(this).apply {
|
||||||
initializeComponent(CrashInitializer::class.java)
|
initializeComponent(CrashInitializer::class.java)
|
||||||
initializeComponent(TracingInitializer::class.java)
|
initializeComponent(TracingInitializer::class.java)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue