Skip to content
Merged
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions src/app/features/room-nav/RoomNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ export function RoomNavItem({
};

const optionsVisible = hover || !!menuAnchor;
const isMutedRoom = notificationMode === RoomNotificationMode.Mute;
const shouldShowUnreadIndicator = !isMutedRoom && (!!unread || hasRoomUnread);

let unreadCount = 0;
if (unread) {
unreadCount = unread.highlight > 0 ? unread.highlight : unread.total;
Expand All @@ -368,7 +371,7 @@ export function RoomNavItem({
<NavItem
variant="Background"
radii="400"
highlight={unread !== undefined || hasRoomUnread}
highlight={shouldShowUnreadIndicator}
aria-selected={selected}
data-hover={!!menuAnchor}
onContextMenu={handleContextMenu}
Expand Down Expand Up @@ -425,7 +428,7 @@ export function RoomNavItem({
<TypingIndicator size="300" disableAnimation />
</Badge>
)}
{!optionsVisible && (unread || hasRoomUnread) && (
{!optionsVisible && shouldShowUnreadIndicator && (
<UnreadBadgeCenter>
<UnreadBadge
highlight={!!unread && unread.highlight > 0}
Expand Down
Loading