fix minor bug with notification handling

This commit is contained in:
marlon-erler
2026-04-15 10:43:52 +00:00
parent 8bdd4db1be
commit 9fdc2e3768
3 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1255,7 +1255,8 @@
if (chatMessage == null) return;
chatMessage.status = "received" /* Received */;
this.addMessage(chatMessage);
if (chatMessage.stringifiedFile != void 0) return;
console.log("MESSAGE", chatMessage.stringifiedFile);
if (chatMessage.stringifiedFile) return;
this.setReadStatus(true);
};
this.handleReaction = (reaction) => {
@@ -3762,6 +3763,7 @@
this.showNotification = (message) => {
const notification = _NotificationViewModel.createNotification(message);
if (this.seenMessageIds.has(message.id)) return;
if (this.chatListViewModel.selectedChat.value == void 0) return;
const currentChat = this.chatListViewModel.selectedChat.value.chatModel.info.primaryChannel;
const currentPage = this.chatListViewModel.selectedChat.value.selectedPage.value;
if (notification.chat == currentChat && currentPage == "messages" /* Messages */)
+1 -1
View File
@@ -103,7 +103,7 @@ export default class ChatModel {
this.addMessage(chatMessage);
if (chatMessage.stringifiedFile != undefined) return;
if (chatMessage.stringifiedFile) return;
this.setReadStatus(true);
};
@@ -17,6 +17,8 @@ export default class NotificationViewModel {
NotificationViewModel.createNotification(message);
if (this.seenMessageIds.has(message.id)) return;
if (this.chatListViewModel.selectedChat.value == undefined) return;
const currentChat =
this.chatListViewModel.selectedChat.value.chatModel.info
.primaryChannel;