Fixed
Status Update
Comments
tj...@gmail.com <tj...@gmail.com> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
is...@google.com <is...@google.com>
da...@gmail.com <da...@gmail.com> #4
Thanks for the detailed analysis. This may not be an issue anymore since we've started using Main.immediate there but I' not sure; I'll try to create a test case.
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #5
just emitting same live data reproduces the issue.
@Test
fun raceTest() {
val subLiveData = MutableLiveData(1)
val subject = liveData(testScope.coroutineContext) {
emitSource(subLiveData)
emitSource(subLiveData) //crashes
}
subject.addObserver().apply {
testScope.advanceUntilIdle()
}
}
@Test
fun raceTest() {
val subLiveData = MutableLiveData(1)
val subject = liveData(testScope.coroutineContext) {
emitSource(subLiveData)
emitSource(subLiveData) //crashes
}
subject.addObserver().apply {
testScope.advanceUntilIdle()
}
}
Description
See sample recording and watch the yellow fragment. When back is pressed from the unoptimized transactions, yellow is NOT visible. When back is pressed from optimized transactions, the yellow IS seen. The behavior is similar for other types of transition animations like fade-in/out.
Sometimes I'll be popping from C to B, in which case I need the postpone to make the transition smooth.
Can the framework handle this somehow and keep B out of sight?
Seeing this in both 25.3.0 and 25.2.0.
Thanks!