From 4207844826043cd1901bd68661d3dc2aa5110bd1 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Fri, 9 Jul 2021 09:49:08 +0200 Subject: [PATCH] fix(@desktop/chat): app crash when you click macOS' notification A crash is happening not only when you click on a notification bubble with mentions, but on any chat notification displayed in macOS' notification center. Discussion and details how we can overcome this may be seen on zenhub, in issue 2819. So far this commit is just a simple solution to avoid an app crash. Fixes: #2819 --- ui/app/AppLayouts/Chat/ChatColumn.qml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index de9fd5e8bf..f9b0b9a149 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -199,15 +199,14 @@ StackLayout { } function clickOnNotification() { + // So far we're just showing this app as the top most window. Once we decide about the way + // how to notify the app what channle should be displayed within the app when user clicks + // notificaiton bubble this part should be updated accordingly. + // + // I removed part of this function which caused app crash. applicationWindow.show() applicationWindow.raise() applicationWindow.requestActivate() - appMain.changeAppSection(Constants.chat) - if (currentNotificationChatId) { - chatsModel.channelView.setActiveChannel(currentNotificationChatId) - } else if (currentNotificationCommunityId) { - chatsModel.communities.setActiveCommunity(currentNotificationCommunityId) - } } Connections {