Fixobserveorder#2766
Merged
fire-light42 merged 7 commits intomasterfrom May 6, 2026
Merged
Conversation
Contributor
|
Nice! Thanks for this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem with the old system was that observe might say that the link loading is finished when the viewModel.state disagrees, and this fixes that by dropping livedata
I tested with:
playerGoBack.setOnClickListener { requireFragmentManager() .beginTransaction() .detach(this@FullScreenPlayer).commit() requireFragmentManager() .beginTransaction() .attach(this@FullScreenPlayer).commit() }playerGoBack.setOnClickListener { activity?.recreate() }Background process limit -> No background processes.@Luna712
This should give:
Fragment recreated -> Reloads player
Activity recreated -> Reloads links (may use link cache)
Process killed -> Exists player
There might be some other possibility I am unaware of given some weird recreation order, but now the view-model should be in-sync at all times.