Skip to content
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

fix(ui): Consider banned rooms as rooms we left in the non-left rooms matcher #4448

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Dec 20, 2024

Recently we started to differentiate between rooms we've been banned from from rooms we have left on our own.

Sadly the non-left rooms matcher only checked if the room state is not equal to the Left state. This then accidentally moved all the banned rooms to be considered as non-left.

We replace the single if expression with a match and list all the states, this way we're going to be notified by the compiler that we need to consider any new states we add in the future.

This closes: #4447.

@poljar poljar requested a review from a team as a code owner December 20, 2024 11:09
@poljar poljar requested review from stefanceriu and removed request for a team December 20, 2024 11:09
… matcher

Recently we started to differentiate between rooms we've been banned
from from rooms we have left on our own.

Sadly the non-left rooms matcher only checked if the room state is not
equal to the Left state. This then accidentally moved all the banned
rooms to be considered as non-left.

We replace the single if expression with a match and list all the
states, this way we're going to be notified by the compiler that we need
to consider any new states we add in the future.
@poljar poljar requested review from Hywan and removed request for stefanceriu December 20, 2024 11:18
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, lgtm! 👍

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.44%. Comparing base (f8a9d12) to head (afc3ff8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4448      +/-   ##
==========================================
+ Coverage   85.42%   85.44%   +0.02%     
==========================================
  Files         283      283              
  Lines       31569    31571       +2     
==========================================
+ Hits        26967    26977      +10     
+ Misses       4602     4594       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@poljar poljar merged commit 36427b0 into main Dec 20, 2024
39 of 40 checks passed
@poljar poljar deleted the poljar/fix-non-left-filter branch December 20, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RoomList NonLeft filter doesn't work with Banned
3 participants