add mounted check to chat scroll

This commit is contained in:
Henry Hiles 2026-11-16 09:28:25 -05:00
commit 3112871ceb
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -162,6 +162,8 @@ final class ChatScroll({
await paginate(.forward); await paginate(.forward);
} }
if (!hookContext.mounted || !scrollController.hasClients) return;
if (!isHistorical && position.extentBefore <= 0) await markRead(); if (!isHistorical && position.extentBefore <= 0) await markRead();
if (controllerData.isLoading == false && if (controllerData.isLoading == false &&