Last active
March 24, 2018 18:42
-
-
Save CesarValiente/91b2ad8a2bff96dbc13dc84bb5df1fa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class ControllerView( | |
val store: Store, | |
mainThread: ThreadExecutor? = null) | |
: LifecycleCallbacks, StateHandler(mainThread) { | |
override fun onStart() { | |
store.stateHandlers.add(this) | |
} | |
override fun onDestroy() { | |
store.stateHandlers.remove(this) | |
} | |
override fun handle(data: State) { | |
handleState(data) | |
} | |
abstract fun handleState(state: State) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment