mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Add a debug feedback when receiving a message that has not been notified.
Fix timeline combobox filter for filtering on first click. Update SDK.
This commit is contained in:
parent
ea087ea3dd
commit
50d89c60fb
3 changed files with 16 additions and 5 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit fe54d5571dd50e17b0de0bfe56a634990a3e6ff7
|
||||
Subproject commit 30c10c2fc620369a2aaf584c78290298957241e6
|
||||
Loading…
Add table
Reference in a new issue