| .. | .. |
|---|
| 245 | 245 | // sent immediately if already connected. |
|---|
| 246 | 246 | _push = PushService(mqttService: _ws!); |
|---|
| 247 | 247 | _push!.onNotificationTap = (data) { |
|---|
| 248 | | - // If notification carried a sessionId, switch to it |
|---|
| 248 | + // If notification carried a sessionId, switch to that session |
|---|
| 249 | 249 | final sessionId = data['sessionId'] as String?; |
|---|
| 250 | 250 | if (sessionId != null && mounted) { |
|---|
| 251 | | - ref.read(activeSessionIdProvider.notifier).state = sessionId; |
|---|
| 252 | | - ref.read(messagesProvider.notifier).switchSession(sessionId); |
|---|
| 251 | + _switchSession(sessionId); |
|---|
| 253 | 252 | } |
|---|
| 254 | 253 | }; |
|---|
| 255 | 254 | await _push!.initialize(); |
|---|