fix bugs with marquee
This commit is contained in:
Binary file not shown.
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user