Stanislav Kral
05/12/2024, 8:50 PMprivate val manualPinKeySynchronizationEvents = MutableSharedFlow<Any>(
replay = 1,
extraBufferCapacity = 1,
onBufferOverflow = BufferOverflow.DROP_OLDEST
)
I use replay = 1
so that if there are any events before I start collecting this flow I don't miss them.
Later on I use this flow in the following way:
merge(failedSynchronizationsSource(), manualSynchronizationSource())
.distinctUntilChanged()
.mapLatest { synchronizationRequired ->
...