Marc Knaup
10/13/2020, 9:47 PMstateIn
need an initial value?
I keep writing .stateIn(…, …, initialValue = null).filterNotNull()
ephemient
10/13/2020, 9:55 PMStateFlow.value
return without an initial value?Marc Knaup
10/13/2020, 9:59 PMsuspend fun value()
instead.ephemient
10/13/2020, 10:00 PMgildor
10/13/2020, 11:19 PMMarc Knaup
10/14/2020, 12:41 AMephemient
10/14/2020, 12:51 AMMarc Knaup
10/14/2020, 1:21 AM.conflate().distinctUntilChanged()
before each .shareIn
to achieve the same behavior.gildor
10/14/2020, 1:52 AMSo it was designed for a subset of potential use casesExactly. as any other abstraction I believe, has some use cases in mind
MutableSharedFlow(replay = 1, onBufferOverflow = BufferOverflow.DROP_OLDEST)