Created
April 2, 2020 14:11
-
-
Save fluxtah/d5b8332a766c18d9605cf8442562d067 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class HelloPresenter(val model: HelloModel, val view: HelloView) { | |
fun onCreated(init: Boolean) { | |
// If this is the first time we loaded, | |
// then load the first greeting | |
if (init) { | |
model.loadGreeting() | |
} | |
} | |
fun onGreetingLoaded(greeting: String) { | |
view.updateGreetingText(greeting) | |
} | |
fun onShowNewGreetingButtonPressed() { | |
model.loadGreeting() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment