Commit 638664d9 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Code improvement.

parent 51df8f31
...@@ -8,6 +8,7 @@ import kotlinx.coroutines.experimental.Job ...@@ -8,6 +8,7 @@ import kotlinx.coroutines.experimental.Job
import javax.inject.Inject import javax.inject.Inject
class CancelStrategy @Inject constructor(owner: LifecycleOwner, val jobs: Job) : LifecycleObserver { class CancelStrategy @Inject constructor(owner: LifecycleOwner, val jobs: Job) : LifecycleObserver {
init { init {
owner.lifecycle.addObserver(this) owner.lifecycle.addObserver(this)
} }
......
...@@ -10,7 +10,7 @@ import dagger.android.support.AndroidSupportInjectionModule ...@@ -10,7 +10,7 @@ import dagger.android.support.AndroidSupportInjectionModule
import javax.inject.Singleton import javax.inject.Singleton
@Singleton @Singleton
@Component(modules = arrayOf(AndroidSupportInjectionModule::class, AppModule::class, ActivityBuilder::class)) @Component(modules = [AndroidSupportInjectionModule::class, AppModule::class, ActivityBuilder::class])
interface AppComponent { interface AppComponent {
@Component.Builder @Component.Builder
......
...@@ -11,19 +11,17 @@ import chat.rocket.android.dagger.scope.PerActivity ...@@ -11,19 +11,17 @@ import chat.rocket.android.dagger.scope.PerActivity
import dagger.Module import dagger.Module
import dagger.android.ContributesAndroidInjector import dagger.android.ContributesAndroidInjector
@Module @Module abstract class ActivityBuilder {
abstract class ActivityBuilder {
@PerActivity @PerActivity
@ContributesAndroidInjector(modules = arrayOf( @ContributesAndroidInjector(modules = [AuthenticationModule::class,
AuthenticationModule::class,
LoginFragmentProvider::class, LoginFragmentProvider::class,
ServerFragmentProvider::class, ServerFragmentProvider::class,
SignupFragmentProvider::class, SignupFragmentProvider::class,
TwoFAFragmentProvider::class TwoFAFragmentProvider::class
)) ])
abstract fun bindAuthenticationActivity(): AuthenticationActivity abstract fun bindAuthenticationActivity(): AuthenticationActivity
@ContributesAndroidInjector @ContributesAndroidInjector abstract fun bindMainActivity(): MainActivity
abstract fun bindMainActivity(): MainActivity
} }
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