Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
ap...@google.com <ap...@google.com> #3
yea i'll take it.
jb...@google.com <jb...@google.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.
Description
Having just a
remember { }
around calls togetBackStackEntry(route)
causes new entries with the same id to use the old remember scope which can cause crashes. We should instead be telling devs to useremember(entry) { }
using the entry from thecomposable
function lambda scope as the input to theremember
calculation. This way, whenever the entry object changes, we also recompose theremember
and we never get a stale entry.