From 754841fec12403db46da3b654bf1f20e60f83c61 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 28 Aug 2025 12:40:02 +0200 Subject: [PATCH] Refresh friends presence status on notify reception. --- CHANGELOG.md | 8 ++++++-- .../src/components/contacts/ContactsListModel.cpp | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7db3827d..dde7c28b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 5.3.1 - undefined + +- Publish presence indicator synchronized on default account. +- Remove from GUI a bad account created from Assistant. +- Synchronize contacts presence status. + ## 5.3.0 - 2025-08-21 ### Fixed @@ -14,8 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Avoid to register the account while activating it. - Volumes settings based on hardware volumes. Remove software gains. - Display call duration instead of conference duration. -- Publish presence indicator synchronized on default account. -- Remove from GUI a bad account created from Assistant. ### Added - Screen Sharing in conference calls diff --git a/linphone-app/src/components/contacts/ContactsListModel.cpp b/linphone-app/src/components/contacts/ContactsListModel.cpp index 78ecac122..f20568c57 100644 --- a/linphone-app/src/components/contacts/ContactsListModel.cpp +++ b/linphone-app/src/components/contacts/ContactsListModel.cpp @@ -229,5 +229,16 @@ void ContactsListModel::onContactUpdated(const std::shared_ptr void ContactsListModel::onSyncStatusChanged(linphone::FriendList::SyncStatus status, const std::string & message){ } void ContactsListModel::onPresenceReceived(const std::list> & friends){ + for (auto linphoneFriend : friends) { + if(linphoneFriend) { + QQmlEngine *engine = App::getInstance()->getEngine(); + auto haveContact = std::find_if(mList.begin(), mList.end(), [linphoneFriend] (const QSharedPointer& item){ + return item.objectCast()->getFriend() == linphoneFriend; + }); + if ( haveContact != mList.end()) { + haveContact->objectCast()->refreshPresence(); + } + } + } }