Skip to content

Instantly share code, notes, and snippets.

@SeongUgJung
Created October 5, 2019 12:28
Show Gist options
  • Save SeongUgJung/b824161872d8232fa0c3f7e67bdf0d93 to your computer and use it in GitHub Desktop.
Save SeongUgJung/b824161872d8232fa0c3f7e67bdf0d93 to your computer and use it in GitHub Desktop.
class ExampleActivity: AppCompatActivity {
@Inject lateinit var interactorController: InteractorController
private var destroyDisposable: Disposable? = null
private var pauseDisposable: Disposable? = null
fun onCreated() {
destroyDisposable = interactorController.onInit()
}
fun onDestroyed() {
destroyDisposable?.dispose()
}
fun onResumeed() {
pauseDisposable = interactorController.onVisible()
}
fun onPaused() {
pauseDisposable?.dispose()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment