From 5ec8c07380406e765225355d8ae3e5ecaff75663 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 21 Nov 2025 03:05:05 -0500 Subject: [PATCH] ChannelTabs: Fix Render Issue --- .../channelTabs/components/ChannelTab.tsx | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/equicordplugins/channelTabs/components/ChannelTab.tsx b/src/equicordplugins/channelTabs/components/ChannelTab.tsx index f8338b1c7..978da1b4a 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTab.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTab.tsx @@ -137,11 +137,17 @@ function ChannelTabContent(props: ChannelTabsProps & { showStatusIndicators } = settings.use(["noPomeloNames", "showStatusIndicators"]); - const [isTyping] = useStateFromStores( - [TypingStore], - () => [ - !!((Object.keys(TypingStore.getTypingUsers(props.channelId)) as string[]).filter(id => id !== userId).length) - ] + const [isTyping, status, isMobile] = useStateFromStores( + [TypingStore, PresenceStore], + () => { + const recipientId = recipients?.[0] ?? ""; + + return [ + !!((Object.keys(TypingStore.getTypingUsers(props.channelId)) as string[]).filter(id => id !== userId).length), + PresenceStore.getStatus(recipientId), + PresenceStore.isMobileOnline(recipientId) + ]; + } ); if (guild) { @@ -183,17 +189,6 @@ function ChannelTabContent(props: ChannelTabsProps & { } } - if (!recipients) return null; - - const [status, isMobile] = useStateFromStores( - [PresenceStore], - () => [ - PresenceStore.getStatus(recipients[0]) as string, - PresenceStore.isMobileOnline(recipients[0]) as boolean - ] - ); - - if (channel && recipients?.length) { if (recipients.length === 1) { const user = UserStore.getUser(recipients[0]) as User & { globalName: string; };