From fdb741097644079c27574a5916bdd2dca03a0df7 Mon Sep 17 00:00:00 2001 From: Hampus Date: Thu, 8 Oct 2026 20:32:33 +0200 Subject: [PATCH] fix(threads): light up joined threads in muted communities (#3316) --- .../src/features/threads/components/SidebarThreadList.tsx | 4 ++-- .../src/features/threads/utils/ThreadNotificationUtils.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fluxer_app/src/features/threads/components/SidebarThreadList.tsx b/fluxer_app/src/features/threads/components/SidebarThreadList.tsx index 573775763..94ac05ad3 100644 --- a/fluxer_app/src/features/threads/components/SidebarThreadList.tsx +++ b/fluxer_app/src/features/threads/components/SidebarThreadList.tsx @@ -14,7 +14,7 @@ import {useThreadMenuData} from '@app/features/threads/hooks/useThreadMenuData'; import ChannelThreads from '@app/features/threads/state/ChannelThreads'; import ThreadGuilds from '@app/features/threads/state/ThreadGuilds'; import ThreadMemberships from '@app/features/threads/state/ThreadMemberships'; -import {isThreadMuted} from '@app/features/threads/utils/ThreadNotificationUtils'; +import {isThreadMutedInSidebar} from '@app/features/threads/utils/ThreadNotificationUtils'; import * as ContextMenuCommands from '@app/features/ui/commands/ContextMenuCommands'; import {MentionBadge} from '@app/features/ui/components/MentionBadge'; import {MenuBottomSheet} from '@app/features/ui/menu_bottom_sheet/MenuBottomSheet'; @@ -46,7 +46,7 @@ const ThreadMenuSheet = observer(({thread, onClose}: {thread: Channel; onClose: const SidebarThreadRow = observer(({thread, isLast, isSelected}: SidebarThreadRowProps) => { const [menuOpen, setMenuOpen] = useState(false); const joined = ThreadMemberships.isMember(thread.id); - const muted = isThreadMuted(thread); + const muted = isThreadMutedInSidebar(thread); const mentionCount = ReadStates.getMentionCount(thread.id); const isUnread = joined && !muted && ReadStates.hasUnread(thread.id); const handleClick = useCallback(() => openThreadFullView(thread), [thread]); diff --git a/fluxer_app/src/features/threads/utils/ThreadNotificationUtils.ts b/fluxer_app/src/features/threads/utils/ThreadNotificationUtils.ts index 00bd396dc..83ab1e34e 100644 --- a/fluxer_app/src/features/threads/utils/ThreadNotificationUtils.ts +++ b/fluxer_app/src/features/threads/utils/ThreadNotificationUtils.ts @@ -24,6 +24,13 @@ export function isThreadParentMuted(thread: Channel): boolean { return thread.parentId != null && UserGuildSettings.isMutedAtAnyLevel(thread.guildId ?? null, thread.parentId); } +export function isThreadMutedInSidebar(thread: Channel): boolean { + return ( + ThreadMemberships.isMuted(thread.id) || + (thread.parentId != null && UserGuildSettings.isChannelDirectlyMuted(thread.guildId ?? null, thread.parentId)) + ); +} + export function isThreadMuted(thread: Channel): boolean { return ThreadMemberships.isMuted(thread.id) || isThreadParentMuted(thread); }