Fix subscriptions double loading on launch #5930
Merged
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.
Fix subscriptions double loading on launch
Pull Request Type
Description
Currently when Fetch Subscriptions Automatically is enabled we start loading remotely and when the subscriptions cache is ready we load from that too, which results in the UI being all buggy, as you have two loading operations running in parallel. This pull request fixes that by not reacting to the subscription cache being ready if we are already loading remotely, which avoids the double loading problem.
Testing
As how noticable the bugginess is depends on lots of different variables it's difficult to say how to reproduce it consistently, however you can still check that this didn't break anything. So that fetching remotely still works and that if Fetch Subscriptions Automatically is disabled it still loads from the cache when it is ready.
Desktop