Created
October 29, 2018 20:28
-
-
Save EmmanuelGuther/eb069d7c6d6608f999b353398179d142 to your computer and use it in GitHub Desktop.
notifyWhitAction waits as a second argument for a function, and for something as simple as closing an activity we are not going to create a function ... we use an anonymous one.
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
when (layoutEditableMode) { | |
true -> notifyWithAction(message, (R.string.exit), { fun() = activity?.finish() }, circleImageViewProfessionalProfileEditable) | |
false -> notifyWithAction(message, R.string.refresh, ::loadData, circleImageViewProfessionalProfile) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment