From 42f8d4252d4a809ffbb7c13d74656953dd3d2e3f Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Mon, 16 Nov 2026 01:37:59 -0500 Subject: [PATCH] fix: a channel open in a tab behind another is no longer marked read (#34450) --- src/lib/components/channel/Channel.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/channel/Channel.svelte b/src/lib/components/channel/Channel.svelte index a70dba0a31..2af569c622 100644 --- a/src/lib/components/channel/Channel.svelte +++ b/src/lib/components/channel/Channel.svelte @@ -188,12 +188,12 @@ }; const initHandler = async () => { - if (currentId) { + if (currentId && $active) { updateLastReadAt(currentId); } currentId = id; - updateLastReadAt(id); + if ($active) updateLastReadAt(id); top = false; messages = null; @@ -410,7 +410,7 @@ onDestroy(() => { stopInvitation(); // last read at - updateLastReadAt(id); + if ($active) updateLastReadAt(id); if ($_channelId === id) _channelId.set(null); $socket?.off('events:channel', channelEventHandler); mediaQuery?.removeEventListener('change', handleMediaQuery);