-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdk-base: Add RoomInfoNotableUpdateReasons::MEMBERSHIP
#3717
Conversation
5fae4ed
to
d2bc560
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3717 +/- ##
==========================================
- Coverage 84.13% 84.13% -0.01%
==========================================
Files 263 263
Lines 27584 27589 +5
==========================================
+ Hits 23208 23212 +4
- Misses 4376 4377 +1 ☔ View full report in Codecov by Sentry. |
@Hywan just double checking, do we still want to use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks almost good! Thanks for working on this!
room_info_notable_updates.insert( | ||
room_info.room_id.to_owned(), | ||
RoomInfoNotableUpdateReasons::MEMBERSHIP, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful that it will override an existing entry. Instead, I recommend to use the following code:
room_info_notable_updates.insert( | |
room_info.room_id.to_owned(), | |
RoomInfoNotableUpdateReasons::MEMBERSHIP, | |
); | |
room_info_notable_updates | |
.entry(room_id.clone()) // get the entry | |
.or_default() // if it doesn't exist, create a default one | |
.insert(RoomInfoNotableUpdateReasons::MEMBERSHIP); // insert `MEMBERSHIP` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed by ea949a4
This fixes joined rooms not being bumped to the top of the timeline and left rooms not disappearing from the room list.
…bership does change
eeff546
to
b45f83b
Compare
So... does this need any more changes? |
I don't think so. |
Then should we approve it so it can be squashed and merged 😅 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This fixes left rooms not disappearing from the room list.
Signed-off-by: