fixed stale state after logout and replayed or lost share intents

This commit is contained in:
MineTec committed 2026-09-24 21:43:21 +02:00
1 parent e4e2b1a4fb
commit 498d195138
32 files changed
+743 -188

No files matched your search

@@ -123,6 +123,15 @@ class ChatBloc
/// No-op when the bloc has already moved on to a different token: when
/// popping a stacked chat (B over A), A's didPopNext runs setToken(A)
/// before B's dispose fires.
/// The chat view may still be popping when the sign-out resets this bloc,
/// so leaveChat would find no token and the long-poll would keep running.
@override
Future<void> reset() {
_chatViewActive = false;
_stopLongPoll();
return super.reset();
}
void leaveChat(String fromToken) {
if ((innerState?.currentToken ?? '') != fromToken) return;
_chatViewActive = false;