From 78766c1672103e49b59bd4f1b35c6d5403f39ee8 Mon Sep 17 00:00:00 2001 From: Melvin Keskin Date: Sun, 2 May 2021 22:01:02 +0000 Subject: [PATCH 1/2] ChatPage: Fix position of jump to bottom button on mobile devices Commit 29e9eda43ce5b003b58ed1d48ff13d8916d60986 moved the button. As a consequence, it was covered by the right drawer handle. --- src/qml/ChatPage.qml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/qml/ChatPage.qml b/src/qml/ChatPage.qml index 6e0c342..3b77d4f 100644 --- a/src/qml/ChatPage.qml +++ b/src/qml/ChatPage.qml @@ -414,8 +414,16 @@ ChatPageBase { height: messageListView.atYEnd ? 0 : 50 anchors.right: parent.right anchors.bottom: parent.bottom - anchors.bottomMargin: sendingPane.height + 5 - anchors.rightMargin: root.flickable.Controls.ScrollBar.vertical.implicitWidth + 5 + anchors.bottomMargin: { + Kirigami.Settings.isMobile + ? sendingPane.height + : sendingPane.height + 5 + } + anchors.rightMargin: { + Kirigami.Settings.isMobile + ? root.flickable.Controls.ScrollBar.vertical.implicitWidth + 35 + : root.flickable.Controls.ScrollBar.vertical.implicitWidth + 5 + } icon.name: "go-down" onClicked: messageListView.positionViewAtIndex(0, ListView.Center) From 5374c441e52c372ff49800bbef453296cf937a19 Mon Sep 17 00:00:00 2001 From: Melvin Keskin Date: Thu, 27 May 2021 16:51:07 +0200 Subject: [PATCH 2/2] MessageModel: Fix message notifications --- src/MessageModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MessageModel.cpp b/src/MessageModel.cpp index bf2d282..e979d2f 100644 --- a/src/MessageModel.cpp +++ b/src/MessageModel.cpp @@ -632,10 +632,10 @@ void MessageModel::showMessageNotification(const Message &message, MessageOrigin const auto accountJid = AccountManager::instance()->jid(); const auto chatJid = message.from(); - bool userMuted = !Kaidan::instance()->notificationsMuted(chatJid); + bool userMuted = Kaidan::instance()->notificationsMuted(chatJid); bool chatActive = isChatCurrentChat(accountJid, chatJid) && - QGuiApplication::applicationState() != Qt::ApplicationActive; + QGuiApplication::applicationState() == Qt::ApplicationActive; if (!userMuted && !chatActive) { const auto chatName = RosterModel::instance()->itemName(accountJid, chatJid);