diff --git a/src/components/views/spaces/threads-activity-centre/useUnreadThreadRooms.ts b/src/components/views/spaces/threads-activity-centre/useUnreadThreadRooms.ts index addaeb97b8..115b208560 100644 --- a/src/components/views/spaces/threads-activity-centre/useUnreadThreadRooms.ts +++ b/src/components/views/spaces/threads-activity-centre/useUnreadThreadRooms.ts @@ -96,6 +96,12 @@ function computeUnreadThreadRooms(mxClient: MatrixClient, msc3946ProcessDynamicP if (VisibilityProvider.instance.isRoomVisible(room) && doesRoomHaveUnreadThreads(room)) { // Get the greatest notification level of all rooms const notificationLevel = getThreadNotificationLevel(room); + + // If the room has an activity notification or less, we ignore it + if (notificationLevel <= NotificationLevel.Activity) { + continue; + } + if (notificationLevel > greatestNotificationLevel) { greatestNotificationLevel = notificationLevel; } diff --git a/test/components/views/spaces/ThreadsActivityCentre-test.tsx b/test/components/views/spaces/ThreadsActivityCentre-test.tsx index 4ae890638f..8155773e6d 100644 --- a/test/components/views/spaces/ThreadsActivityCentre-test.tsx +++ b/test/components/views/spaces/ThreadsActivityCentre-test.tsx @@ -111,17 +111,13 @@ describe("ThreadsActivityCentre", () => { expect(getTACMenu()).toBeInTheDocument(); }); - it("should render a room with a activity in the TAC", async () => { + it("should not render a room with a activity in the TAC", async () => { cli.getVisibleRooms = jest.fn().mockReturnValue([roomWithActivity]); renderTAC(); await userEvent.click(getTACButton()); - const tacRows = screen.getAllByRole("menuitem"); - expect(tacRows.length).toEqual(1); - - getByText(tacRows[0], "Just activity"); - expect(tacRows[0].getElementsByClassName("mx_NotificationBadge").length).toEqual(1); - expect(tacRows[0].getElementsByClassName("mx_NotificationBadge_level_notification").length).toEqual(0); + // We should not render the room with activity + expect(() => screen.getAllByRole("menuitem")).toThrow(); }); it("should render a room with a regular notification in the TAC", async () => { diff --git a/test/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap b/test/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap index c5e29e38ce..d82c7df6d0 100644 --- a/test/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap +++ b/test/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap @@ -2,7 +2,7 @@ exports[`ThreadsActivityCentre renders notifications matching the snapshot 1`] = ` - `; exports[`ThreadsActivityCentre should match snapshot when empty 1`] = `