JimK
09/29/2020, 3:55 PMJimK
09/29/2020, 3:56 PMIntent.ShowThing -> State(showThing = true), Intent.SomeOtherAction -> State(showThing = true),
Intent.HideThing -> State(showThing = false)Arkadii Ivanov
09/29/2020, 3:58 PMJimK
09/29/2020, 4:54 PMval viewActions: Value<ViewActions>JimK
09/29/2020, 4:55 PMsealed class ViewActions{
object ShowSnackbar: ViewActions()
}JimK
09/29/2020, 4:57 PMJimK
09/29/2020, 4:58 PMArkadii Ivanov
09/29/2020, 5:04 PMValue thing is converted to Compose State for observations. I don't think it is a right way to deliver one time events. I think it has equals check somewhere under the hood. I would say that snack bar visibility should be either part of the state, or should be delivered via e.g. an Observable or a Flow . So you could subscribe for it in the UI layer. Or you can introduce your own SnackBarController and pass it to the Component.JimK
09/29/2020, 5:05 PMequalsJimK
09/29/2020, 5:06 PMJimK
09/29/2020, 5:39 PMArkadii Ivanov
09/29/2020, 5:53 PMJimK
09/29/2020, 5:55 PMArkadii Ivanov
09/29/2020, 6:00 PMJimK
09/29/2020, 6:01 PM