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 &&