Created
June 17, 2020 08:52
-
-
Save mrahimygk/ae2bc2d0a4b6978f42d81599ad65e7a9 to your computer and use it in GitHub Desktop.
Revisions
-
mrahimygk created this gist
Jun 17, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ private fun bindParentObservables() { viewModel.snackMessageCommand.observe(viewLifecycleOwner, EventObserver { command -> when (command) { is SnackCommand.StringResSnackCommand -> view?.showSnackBar( command.message, duration = command.duration ) is SnackCommand.StringSnackCommand -> view?.showSnackBar( command.message, duration = command.duration ) is SnackCommand.ActionedStringSnackCommand -> { view?.showSnackBar( command.message, duration = command.duration, action = command.action.paired() ) } is SnackCommand.ActionedStringResSnackCommand -> { view?.showSnackBar( command.message, duration = command.duration, action = command.action.paired() ) } } }) }