Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix accidentally inverted condition for room ordering #10178

Merged
merged 2 commits into from
Feb 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export class ImportanceAlgorithm extends OrderingAlgorithm {
// Every other sorting type affects the categories, not the whole tag.
const categorized = this.categorizeRooms(rooms);
for (const category of Object.keys(categorized)) {
if (!isNaN(Number(category))) continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test for this? Just a general rooms should be sorted as expected test.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this line added before? Did it ever make sense?

Why can we remove it now?

Let's add this context to the PR description

const notificationColor = category as unknown as NotificationColor;
const roomsToOrder = categorized[notificationColor];
categorized[notificationColor] = sortRoomsWithAlgorithm(
Expand Down