From e3ec54aa523e1f530b5f9ea8e337eee86851982d Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Wed, 23 Sep 2026 00:45:13 +0200 Subject: [PATCH] fix bugs with marquee --- dist/index.js | 10 ++++++---- src/ViewModel/Chat/.chatListViewModel.ts.swp | Bin 16384 -> 16384 bytes src/ViewModel/Chat/chatListViewModel.ts | 2 +- src/ViewModel/Global/.coreViewModel.ts.swp | Bin 16384 -> 16384 bytes src/ViewModel/Global/coreViewModel.ts | 2 +- src/ViewModel/Global/notificationViewModel.ts | 7 +++++-- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 65303970..67b14b03 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1298,7 +1298,7 @@ this.connectionModel = connectionModel2; this.chatListModel = chatListModel2; this.fileTransferModel = fileTransferModel2; - this.BUILD = "Build 26.09.22.D"; + this.BUILD = "Build 26.09.22.E"; // CONTEXT this.contextStack = /* @__PURE__ */ new Map(); this.closeContext = (contextId, fromHistoryEvent = false) => { @@ -4683,18 +4683,19 @@ const notification = this.createNotification(message); const currentChat = this.chatListViewModel.selectedChat.value.chatModel.unwrappedPrimaryChannel; const currentPage = this.chatListViewModel.selectedChat.value.selectedPage.value; - if (notification.chat == currentChat && currentPage == "messages" /* Messages */) + if (notification.fullChannel == currentChat && currentPage == "messages" /* Messages */) return; this.messagesInMarquee.push(notification); this.startLoop(); }; this.openNotification = () => { const notification = this.marquee.value; + console.log(notification); if (notification == void 0) return; const chat = [ ...this.chatListViewModel.chatViewModels.value.values() ].find( - (chat2) => chat2.chatModel.unwrappedPrimaryChannel == notification.chat + (chat2) => chat2.chatModel.unwrappedPrimaryChannel == notification.fullChannel ); if (!chat) return; chat.open(); @@ -4734,6 +4735,7 @@ return { messageId: message.id, chat, + fullChannel, sender: message.sender, body: message.body }; @@ -4815,7 +4817,7 @@ // utility this.stripNamespace = (fullChannel) => { for (const vm of this.chatViewModels.value) { - const fullReference = vm.chatModel.info.namespace + vm.chatModel.info.primaryChannel; + const fullReference = vm.chatModel.unwrappedPrimaryChannel; if (fullReference == fullChannel) return vm.chatModel.info.primaryChannel; } return fullChannel; diff --git a/src/ViewModel/Chat/.chatListViewModel.ts.swp b/src/ViewModel/Chat/.chatListViewModel.ts.swp index a06ecfa15f2e69856af1625775aba4e67caf9078..fd67c8c17b1a0fa87a4ef7ec6696e434834d8b74 100644 GIT binary patch delta 195 zcmZo@U~Fh$lut4U^Ym4))H7fJ0s#hwE|$$%O>(jff*uSE>6s-HH>z%QIm6GGJ6TXb zo{?>{p}=K+UMHYZJ|>9z+|7at+ZowF+|P^?H>yp(uPDNnnwOlaU^{uKy@q6IUU^Ys zK|yLtKv8CHVo{}YMq*xGYK}F-W`Cuvyt?uH3=I8146>RHNP)lxAb%|ouL0ueKs*tM YL2CLo8ycMDn|NU2(jff*uSE>6s-HH>z%QIm6GGGg(kT zo{@dCp}=K+-gcl;e { for (const vm of this.chatViewModels.value) { - const fullReference = vm.chatModel.info.namespace + vm.chatModel.info.primaryChannel; + const fullReference = vm.chatModel.unwrappedPrimaryChannel; if (fullReference == fullChannel) return vm.chatModel.info.primaryChannel; } diff --git a/src/ViewModel/Global/.coreViewModel.ts.swp b/src/ViewModel/Global/.coreViewModel.ts.swp index 812005ee7d35288bbda547532c070cd9cf1aca50..63c6c076ec94d7a8a5dff4522a90aea9ae4edea3 100644 GIT binary patch delta 79 zcmZo@U~Fh$lut4U^Ym4))H7fJ0s#hw_bi*Uq7`Ks1U(oS(lbjYZdBdq(xc1hy7{8+ ca(>Zo%nS@1AeBHM4a7hV3|}|*+7>eb011y0mjD0& delta 79 zcmZo@U~Fh$lut4U^Ym4))H7fJ0s#hweaxG)ycA^_1U(oS(lbjYZdBdq(xc1hviYL! ca(>Zw%nS@1AeBHM4a7hV3~x90+7>eb0Qvk9LjV8( diff --git a/src/ViewModel/Global/coreViewModel.ts b/src/ViewModel/Global/coreViewModel.ts index d75f1358..9678e99d 100644 --- a/src/ViewModel/Global/coreViewModel.ts +++ b/src/ViewModel/Global/coreViewModel.ts @@ -9,7 +9,7 @@ import ConnectionModel from "../../Model/Global/connectionModel"; import ChatListModel from "../../Model/Chat/chatListModel"; export default class CoreViewModel { - readonly BUILD = "Build 26.09.22.D"; + readonly BUILD = "Build 26.09.22.E"; translations: Translations; diff --git a/src/ViewModel/Global/notificationViewModel.ts b/src/ViewModel/Global/notificationViewModel.ts index 5b5594f9..f2efc305 100644 --- a/src/ViewModel/Global/notificationViewModel.ts +++ b/src/ViewModel/Global/notificationViewModel.ts @@ -24,7 +24,7 @@ export default class NotificationViewModel { const currentPage = this.chatListViewModel.selectedChat.value.selectedPage.value; if ( - notification.chat == currentChat && + notification.fullChannel == currentChat && currentPage == ChatPageTypes.Messages ) return; @@ -35,13 +35,14 @@ export default class NotificationViewModel { openNotification = () => { const notification: Notification | undefined = this.marquee.value; + console.log(notification); if (notification == undefined) return; const chat = [ ...this.chatListViewModel.chatViewModels.value.values(), ].find( (chat) => - chat.chatModel.unwrappedPrimaryChannel == notification.chat, + chat.chatModel.unwrappedPrimaryChannel == notification.fullChannel, ); if (!chat) return; chat.open(); @@ -91,6 +92,7 @@ export default class NotificationViewModel { return { messageId: message.id, chat, + fullChannel, sender: message.sender, body: message.body, }; @@ -100,6 +102,7 @@ export default class NotificationViewModel { export interface Notification { messageId: string; chat: string; + fullChannel: string; sender: string; body: string; }