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

Fix: Threads button is highlighted when I create a new room #10819

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/components/views/right_panel/RoomHeaderButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default class RoomHeaderButtons extends HeaderButtons<IProps> {
title={_t("Threads")}
onClick={this.onThreadsPanelClicked}
isHighlighted={this.isPhase(RoomHeaderButtons.THREAD_PHASES)}
isUnread={this.state.threadNotificationColor > 0}
isUnread={this.state.threadNotificationColor > NotificationColor.None}
>
<UnreadIndicator color={this.state.threadNotificationColor} />
</HeaderButton>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ describe("RoomHeaderButtons-test.tsx", function () {

it("thread notification does change the thread button", () => {
const { container } = getComponent(room);
expect(getThreadButton(container)!.className.includes("mx_RightPanel_headerButton_unread")).toBeFalsy();

room.setThreadUnreadNotificationCount("$123", NotificationCountType.Total, 1);
expect(getThreadButton(container)!.className.includes("mx_RightPanel_headerButton_unread")).toBeTruthy();
expect(isIndicatorOfType(container, "gray")).toBe(true);

room.setThreadUnreadNotificationCount("$123", NotificationCountType.Highlight, 1);
Expand Down