fix: notifications

- If notification is clicked and app minimized, restore app
- If app is minimized, show notifications for active chat
This commit is contained in:
Richard Ramos 2020-11-20 13:39:14 -04:00 committed by RichΛrd
parent 60702ee639
commit 6494427de0
2 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,6 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Window 2.13
import QtQuick.Layouts 1.13
import QtQml.Models 2.13
import QtGraphicalEffects 1.13

View File

@ -77,15 +77,15 @@ Item {
chatType: root.chatType
identicon: root.identicon
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: {
timer.stop()
notificationWindowSub.close()
applicationWindow.raise()
chatsModel.setActiveChannel(root.chatId)
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: {
timer.stop()
notificationWindowSub.close()
applicationWindow.raise()
chatsModel.setActiveChannel(chatId)
applicationWindow.requestActivate()
}
}