From 21cdcfcb871fce5780f197b6a80a103bf32064be Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 22 Jul 2020 14:27:11 -0400 Subject: [PATCH] close window once to avoid app showing blank screen --- ui/shared/NotificationWindow.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/shared/NotificationWindow.qml b/ui/shared/NotificationWindow.qml index 6ae771f82b..82ff5ebbda 100644 --- a/ui/shared/NotificationWindow.qml +++ b/ui/shared/NotificationWindow.qml @@ -9,9 +9,7 @@ Item { id: root property var chatId: "" property var message: "hello" - property var processClick : Backpressure.oneInTime(root, 1000, function(chatId, msg) { - this.chatId = chatId - this.message = msg + property var processClick : Backpressure.oneInTime(root, 1000, function() { notificationSound.play() var w1 = winInit.createObject(null) w1.destroy() @@ -54,7 +52,6 @@ Item { onClicked: { timer.stop() notificationWindowSub.close() - notificationWindowSub.destroy() mainWin.destroy() applicationWindow.raise() chatsModel.setActiveChannel(chatId); @@ -70,7 +67,6 @@ Item { repeat: false onTriggered: { notificationWindowSub.close() - notificationWindowSub.destroy() } } onVisibleChanged: { @@ -88,7 +84,9 @@ Item { } function notifyUser(chatId, msg) { - processClick(chatId, msg) + this.chatId = chatId + this.message = msg + processClick() } }