dave08
05/21/2020, 8:04 AMStateFlow<Unit?>
can't be used to represent clicks since it's conflated right (unless a new object is created for each emission...)? But SharedFlow
will?_onClick.value = Unit
_onClick.value = null
for each click, and then use filterNotNull()
on the listener's flow... 🙈louiscad
05/21/2020, 10:05 AMFlow
, or an awaitOneClick()
function that disables the button when clicked?dave08
05/21/2020, 10:08 AMstreetsofboston
05/21/2020, 12:15 PMEventFlow
, extending Flow
, for being able to share events, backed by a BroadcastChannel .
We use this one mostly for navigation events emitted by the ViewModeldave08
05/21/2020, 12:23 PMEventFlow
is not going to be covered by SharedFlow
? Also, my little hack (null, Unit, null, Unit) wouldn't be more efficient than a BroadcastChannel
implementation?streetsofboston
05/21/2020, 12:37 PM