| .. | .. |
|---|
| 218 | 218 | final typing = msg['typing'] as bool? ?? msg['isTyping'] as bool? ?? msg['active'] as bool? ?? true; |
|---|
| 219 | 219 | final typingSession = msg['sessionId'] as String?; |
|---|
| 220 | 220 | final activeId = ref.read(activeSessionIdProvider); |
|---|
| 221 | | - // Only show typing indicator for the active session |
|---|
| 222 | | - if (typingSession == null || typingSession == activeId) { |
|---|
| 221 | + // Strict: only show typing for the ACTIVE session, ignore all others |
|---|
| 222 | + if (activeId != null && typingSession == activeId) { |
|---|
| 223 | 223 | ref.read(isTypingProvider.notifier).state = typing; |
|---|
| 224 | 224 | } |
|---|
| 225 | 225 | case 'typing_end': |
|---|
| 226 | 226 | final endSession = msg['sessionId'] as String?; |
|---|
| 227 | | - if (endSession == null || endSession == ref.read(activeSessionIdProvider)) { |
|---|
| 227 | + final activeEndId = ref.read(activeSessionIdProvider); |
|---|
| 228 | + if (activeEndId != null && endSession == activeEndId) { |
|---|
| 228 | 229 | ref.read(isTypingProvider.notifier).state = false; |
|---|
| 229 | 230 | } |
|---|
| 230 | 231 | case 'screenshot': |
|---|