From 3112871ceb0f1e94513ebb70c01e84c7f3443100 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 09:28:25 -0500 Subject: [PATCH] add mounted check to chat scroll --- lib/helpers/hooks/chat_scroll.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/helpers/hooks/chat_scroll.dart b/lib/helpers/hooks/chat_scroll.dart index 84b4043..77d688a 100644 --- a/lib/helpers/hooks/chat_scroll.dart +++ b/lib/helpers/hooks/chat_scroll.dart @@ -162,6 +162,8 @@ final class ChatScroll({ await paginate(.forward); } + if (!hookContext.mounted || !scrollController.hasClients) return; + if (!isHistorical && position.extentBefore <= 0) await markRead(); if (controllerData.isLoading == false &&