wbertan
11/24/2020, 3:34 PMStateFlow to handle a kind of Event, but facing issues when trying to set the same value again (for example when the user clicks the same button again, triggering same event).
Found this GitHub issue: https://github.com/Kotlin/kotlinx.coroutines/issues/2011
With @elizarov comment:
We'll provide a different, more flexible primitive, for those rare cases when you don't want equality-based conflation. Stay tuned.
Do we have anything in the latest release to handle this scenario?bezrukov
11/24/2020, 3:41 PMwbertan
11/24/2020, 3:47 PMMutableSharedFlow<Event>(1, onBufferOverflow = BufferOverflow.DROP_OLDEST)
Basically I want to use the tryEmit in non suspend functions.bezrukov
11/24/2020, 3:50 PMMutableSharedFlow<Event>(1, extraBufferCapacity = ... , onBufferOverflow = BufferOverflow.DROP_OLDEST)bezrukov
11/24/2020, 3:51 PMwbertan
11/24/2020, 3:52 PM