-
Notifications
You must be signed in to change notification settings - Fork 226
Don't display 'join room' screen while leaving a room. #2770
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
Don't display 'join room' screen while leaving a room. #2770
Conversation
if (info?.currentUserMembership == CurrentUserMembership.JOINED) { | ||
if (info.isSpace) { | ||
.map { it.getOrNull() } | ||
.filterNotNull() |
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.
I think the null case is a valid case (the room is not known, for instance following a permalink). With this change, I understand that the null case will not be handled anymore.
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.
Oh, nice catch!
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 in 59c9bad
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.
Sadly there was no unit test to prevent the regression. We may want to extract the logic somewhere... (in the future)
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
e5aba69
to
6010841
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2770 +/- ##
==========================================
Coverage ? 73.47%
==========================================
Files ? 1517
Lines ? 36418
Branches ? 7012
==========================================
Hits ? 26758
Misses ? 5995
Partials ? 3665 ☔ View full report in Codecov by Sentry. |
Centralise the navigation based on membership in a single point in `RoomFlowNode`.
9941abb
to
59c9bad
Compare
I don't really get why 889263e is needed. Maybe something went wrong when merging some other branch to |
|
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!
Type of change
Content
RoomFlowNode
.Motivation and context
Fix annoying issue, deduplicate code.
Tests
Tested devices
Checklist