Skip to content

Commit 3bb480a

Browse files
committed
feat: exclude default section from room list item menu
1 parent 8f9953f commit 3bb480a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

apps/web/src/viewmodels/room-list/RoomListItemViewModel.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,11 @@ export class RoomListItemViewModel
423423

424424
return (
425425
RoomListStoreV3.instance.orderedSectionTags
426-
// Exclude the Chats section because the user toggle the other sections to move rooms in and out of the Chats section.
427-
.filter((tag) => tag !== CHATS_TAG)
426+
// Exclude the Chats because the user toggle the other sections to move rooms in and out of the Chats section.
427+
// Also exclude the default sections because they are available as toggles in the main context menu, and we don't want them to be duplicated in the "Move to section" submenu.
428+
.filter(
429+
(tag) => tag !== CHATS_TAG && tag !== DefaultTagID.Favourite && tag !== DefaultTagID.LowPriority,
430+
)
428431
.map((tag) => ({
429432
tag,
430433
name: RoomListItemViewModel.getSectionName(tag, customSectionData),

0 commit comments

Comments
 (0)