Potential UI update skip in `repeatOnLifecycle`
Just curious and want to know what will happen if the app is in background and value is updated (lets say) lastValue check will see the new value when the app resumes, compare it to the new value property, and potentially skip the UI update.
Originally posted by @criticalAY in https://github.com/ankidroid/Anki-Android/pull/20192#discussion_r2768000507
If the logic inside the collection block updates lastValue before the UI is actually updated, or if there is a mismatch in how lastValue is persisted versus how the flow emits, we might skip a critical UI refresh because the check thinks the state hasn't changed since the "last" (unprocessed) emission.
I'd like to look into this potential issue. Could I get assigned to this?
Hi! I’d like to take a look at this issue and try to resolve it. Please assign it to me if it’s available.