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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user