Commit fe32cafd authored by Leonardo Aramaki's avatar Leonardo Aramaki

Make Applicaton a singleton for ease of access without need to rely on Dagger everywhere

parent e18f18eb
......@@ -25,6 +25,10 @@ class RocketChatApplication : Application(), HasActivityInjector, HasServiceInje
@Inject
lateinit var serviceDispatchingAndroidInjector: DispatchingAndroidInjector<Service>
companion object {
lateinit var instance: RocketChatApplication
}
override fun onCreate() {
super.onCreate()
......@@ -34,6 +38,7 @@ class RocketChatApplication : Application(), HasActivityInjector, HasServiceInje
setupFresco()
setupTimber()
instance = this
}
private fun setupFresco() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment