Matthias Nott
2026-04-01 d54dc1eed8a7864bee407b8460156513b203e8a5
lib/screens/chat_screen.dart
....@@ -245,11 +245,10 @@
245245 // sent immediately if already connected.
246246 _push = PushService(mqttService: _ws!);
247247 _push!.onNotificationTap = (data) {
248
- // If notification carried a sessionId, switch to it
248
+ // If notification carried a sessionId, switch to that session
249249 final sessionId = data['sessionId'] as String?;
250250 if (sessionId != null && mounted) {
251
- ref.read(activeSessionIdProvider.notifier).state = sessionId;
252
- ref.read(messagesProvider.notifier).switchSession(sessionId);
251
+ _switchSession(sessionId);
253252 }
254253 };
255254 await _push!.initialize();