Repository navigation
Don't remove loaded rooms and timelines if the room list service resets - #1362
Merged
Merged
Conversation
The sdk chooses to send full rooms list "Reset" signals whenever it falls behind on a sync operation, which theoretically makes it possible for the rooms list to appear empty. Usually this is just a split second and then it loads again, but it's possible for it to last longer. now we only remove rooms that are actually gone. We make sure to preserve existing timelines and replace the display order all in one atomic step, such that open rooms aren't jeopardized if the rooms list resets. We also ensure to update new metadata for invitations without messing with pending requests, room selection, or invite avatars. Fixes project-robius#1355.
A reset really only needs to check the rooms we alreayd have to see if they have changed (just like other updates), it doesn't need to do extraneous stuff like invites or room preview updates. Also, when logging in for the first time after a login token had expired, we clear the previous session's rooms list. also make sure we remove joined rooms if we got re-invited to them.
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 sdk chooses to send full rooms list "Reset" signals whenever it falls behind on a sync operation, which theoretically makes it possible for the rooms list to appear empty. Usually this is just a split second and then it loads again, but it's possible for it to last longer.
now we only remove rooms that are actually gone. We make sure to preserve existing timelines and replace the display order all in one atomic step, such that open rooms aren't jeopardized if the rooms list resets.
We also ensure to update new metadata for invitations without messing with pending requests, room selection, or invite avatars.
Fixes #1355.