Keep the open thread on screen while reconnecting

The session resubscribes threads itself after a reconnect; App no
longer drops the subscription, so the thread doesn't blank to loading.
This commit is contained in:
Callum Alpass committed 2026-11-02 23:13:51 +11:00
1 parent 2c5eedc869
commit 320dbf492d
1 file changed
+3 -2
+3 -2
View File
@@ -220,9 +220,10 @@ export function App(props: { readonly session: T3Session; readonly config: Tui3C
const [thread, setThread] = useState<ThreadState | null>(null);
useEffect(() => {
setThread(null);
if (!watchedId || shell.status.type !== "live") return;
if (!watchedId) return;
// The session resubscribes after a reconnect; meanwhile the thread stays on screen.
return session.watchThread(watchedId, setThread);
}, [session, watchedId, shell.status.type]);
}, [session, watchedId]);
const unread = threadRow?.unread === true;
useEffect(() => {