From 50d89c60fb4ec802c368d5d7545a7e64e0f98873 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 27 Jul 2022 14:04:04 +0200 Subject: [PATCH] Add a debug feedback when receiving a message that has not been notified. Fix timeline combobox filter for filtering on first click. Update SDK. --- linphone-app/src/components/core/CoreHandlers.cpp | 13 ++++++++++++- .../ui/modules/Linphone/Timeline/Timeline.qml | 6 +++--- linphone-sdk | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp index 37b21fbde..83f379388 100644 --- a/linphone-app/src/components/core/CoreHandlers.cpp +++ b/linphone-app/src/components/core/CoreHandlers.cpp @@ -217,6 +217,7 @@ void CoreHandlers::onMessagesReceived ( CoreManager *coreManager = CoreManager::getInstance(); SettingsModel *settingsModel = coreManager->getSettingsModel(); const App *app = App::getInstance(); + QStringList notNotifyReasons; for(auto message : messages){ if( !message || message->isOutgoing() ) @@ -236,14 +237,24 @@ void CoreHandlers::onMessagesReceived ( && (!app->hasFocus() || !Utils::isMe(chatRoom->getLocalAddress())) && !message->isRead())// On aggregation, the list can contains already displayed messages. messagesToNotify.push_back(message); + else{ + notNotifyReasons.push_back( + "NotifEnabled=" + QString::number(coreManager->getSettingsModel()->getChatNotificationsEnabled()) + +" focus=" +QString::number(app->hasFocus()) + +" isMe=" +QString::number(Utils::isMe(chatRoom->getLocalAddress())) + +" isRead=" +QString::number(message->isRead()) + ); + } } } if( messagesToSignal.size() > 0) emit messagesReceived(messagesToSignal); if( messagesToNotify.size() > 0) app->getNotifier()->notifyReceivedMessages(messagesToNotify); + else if( notNotifyReasons.size() > 0) + qInfo() << "Notification received but was not selected to popup. Reasons : \n" << notNotifyReasons.join("\n"); // 3. Notify with sound. - if( messagesToSignal.size() > 0 || messagesToNotify.size() > 0) { + if( messagesToNotify.size() > 0) { if (!coreManager->getSettingsModel()->getChatNotificationsEnabled() || !settingsModel->getChatNotificationSoundEnabled()) return; diff --git a/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml b/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml index fc3b76659..96cd9cb5b 100644 --- a/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml +++ b/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml @@ -171,6 +171,7 @@ Rectangle { Layout.fillWidth: true id:secureFilter currentIndex: 0 + onCurrentIndexChanged: timeline.model.filterFlags = filterChoices.getFilterFlags() textRole: "key" model: ListModel { ListElement { @@ -188,12 +189,12 @@ Rectangle { haveMargin: false backgroundColor: 'transparent' visible: SettingsModel.secureChatEnabled && SettingsModel.standardChatEnabled - onActivated: timeline.model.filterFlags = filterChoices.getFilterFlags() } ComboBox { Layout.fillWidth: true id:groupFilter currentIndex: 0 + onCurrentIndexChanged: timeline.model.filterFlags = filterChoices.getFilterFlags() textRole: "key" model: ListModel { ListElement { @@ -211,12 +212,12 @@ Rectangle { haveMargin: false backgroundColor: 'transparent' visible: SettingsModel.secureChatEnabled || SettingsModel.standardChatEnabled - onActivated: timeline.model.filterFlags = filterChoices.getFilterFlags() } ComboBox { Layout.fillWidth: true id:ephemeralsFilter currentIndex: 0 + onCurrentIndexChanged: timeline.model.filterFlags = filterChoices.getFilterFlags() textRole: "key" model: ListModel { ListElement { @@ -234,7 +235,6 @@ Rectangle { haveMargin: false backgroundColor: 'transparent' visible: SettingsModel.secureChatEnabled || SettingsModel.standardChatEnabled - onActivated: timeline.model.filterFlags = filterChoices.getFilterFlags() } } } diff --git a/linphone-sdk b/linphone-sdk index fe54d5571..30c10c2fc 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit fe54d5571dd50e17b0de0bfe56a634990a3e6ff7 +Subproject commit 30c10c2fc620369a2aaf584c78290298957241e6