feat: Implement push notification suppression for active chats, prevent duplicate self-messages, update the chat typing indicator, and add back buttons to static screens.

This commit is contained in:
pradeepkumar
2026-03-18 17:24:32 +05:30
parent cde137e07b
commit a4aa9bfe25
8 changed files with 196 additions and 35 deletions

View File

@@ -100,6 +100,10 @@ class MessagingNotifier extends StateNotifier<MessagingState> {
// Avoid duplicates (broadcast may arrive after ack for sender's own message)
if (currentMessages.any((m) => m.id == message.id)) return;
// Ignore own messages — the sender path handles these via sendMessage()
final isMine = message.senderId == _currentUserId;
if (isMine) return;
currentMessages.insert(0, message);
final updatedMessages =
Map<String, List<ChatMessage>>.from(state.messages)