Issue with conflate() operator in bindings
See original GitHub issueI use the events() binding in my application. More precisely I use it to listen for view lifecycle events in a Fragment like viewLifecycleOwner.lifecycle.events()
.
However the ON_START
event is swallowed for some reason. For example I do receive ON_CREATE
and ON_RESUME
but not ON_START
. It seems like this is a race conditions as ON_START
does occur depending of where/when I listen for these events.
I noticed that you apply a conflate()
on the Flow. I copied the code of events()
and just removed conflate()
. With my version I receive ON_START
all the time. So I wonder why do you apply conflate()
? It seems you add this to all bindings? Is there a specific reason?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Flow.takeUntil(otherFlow) #1850 - Kotlin/kotlinx.coroutines
I need analog for rxJava takeUntil operator. This logic can be found here Will such an operator be added to the standard library?...
Read more >A safer way to collect flows from Android UIs - Manuel Vivo .dev
A cold flow backed by a channel or using operators with buffers such as buffer , conflate , flowOn , or shareIn is...
Read more >conflate - Kotlin
Conflates flow emissions via conflated channel and runs collector in a separate coroutine. The effect of this is that emitter is never suspended...
Read more >A safer way to collect flows from Android UIs | by Manuel Vivo
A cold flow backed by a channel or using operators with buffers such as buffer , conflate , flowOn , or shareIn is...
Read more >A pattern matcher for miniKanren or How to get into trouble with CPS ...
CPS macro, binding is delayed until after the comparisons are performed. This may cause free identifiers that are symbolically equal to be conflated, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Released in
0.10.2
.Not that I’m aware of 🤷♂. Anyway I’ll remove
conflate()
to respect the behavior ofLifecycleObserver
.