From 7825646eddbf57e18751d75c92ccd9ab7a2eb5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20J=C3=B6rgensen?= Date: Mon, 20 Oct 2025 11:21:15 +0200 Subject: [PATCH] Add a all message read button to application task bar icon #LINQT-2072 --- Linphone/core/App.cpp | 42 ++++++- Linphone/core/App.hpp | 3 + Linphone/core/account/AccountCore.cpp | 8 ++ Linphone/core/account/AccountList.cpp | 12 ++ Linphone/core/account/AccountList.hpp | 2 + Linphone/data/languages/de.ts | 146 ++++++++++++------------ Linphone/data/languages/en.ts | 146 ++++++++++++------------ Linphone/data/languages/fr_FR.ts | 146 ++++++++++++------------ Linphone/model/account/AccountModel.cpp | 4 + Linphone/model/account/AccountModel.hpp | 1 + 10 files changed, 297 insertions(+), 213 deletions(-) diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index 1644ead37..f70488ffc 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -22,7 +22,6 @@ #include "App.hpp" -#include #include #include #include @@ -631,12 +630,15 @@ void App::initCore() { } auto window = qobject_cast(obj); setMainWindow(window); -#ifndef __APPLE__ +#if defined(__APPLE__) + setMacOSDockActions(); +#else // Enable TrayIconSystem. if (!QSystemTrayIcon::isSystemTrayAvailable()) qWarning("System tray not found on this system."); else setSysTrayIcon(); -#endif // ifndef __APPLE__ +#endif // if defined(__APPLE__) + static bool firstOpen = true; if (!firstOpen || !mParser->isSet("minimized")) { lDebug() << log().arg("Openning window"); @@ -1310,6 +1312,7 @@ bool App::event(QEvent *event) { //----------------------------------------------------------- void App::setSysTrayIcon() { + qDebug() << "setSysTrayIcon"; QQuickWindow *root = getMainWindow(); QSystemTrayIcon *systemTrayIcon = (mSystemTrayIcon ? mSystemTrayIcon @@ -1341,6 +1344,9 @@ void App::setSysTrayIcon() { QAction *quitAction = new QAction(tr("quit_action"), root); root->connect(quitAction, &QAction::triggered, this, &App::quit); + //: "Mark all as read" + QAction *markAllReadAction = createMarkAsReadAction(root); + // trayIcon: Left click actions. QMenu *menu = mSystemTrayIcon ? mSystemTrayIcon->contextMenu() : new QMenu(); menu->clear(); @@ -1350,6 +1356,7 @@ void App::setSysTrayIcon() { menu->addAction(restoreAction); menu->addSeparator(); } + menu->addAction(markAllReadAction); menu->addAction(quitAction); if (!mSystemTrayIcon) { systemTrayIcon->setContextMenu(menu); // This is a Qt bug. We cannot call setContextMenu more than once. So @@ -1369,6 +1376,24 @@ void App::setSysTrayIcon() { if (!QSystemTrayIcon::isSystemTrayAvailable()) qInfo() << "System tray is not available"; } +//----------------------------------------------------------- +// MacOS dock menu actions +//----------------------------------------------------------- + +#ifdef __APPLE__ +/** + * Set more actions to the MacOS Dock actions + * WARNING: call this function only on macOS + */ +void App::setMacOSDockActions() { + QMenu *menu = new QMenu(); + QQuickWindow *root = getMainWindow(); + QAction *markAllReadAction = createMarkAsReadAction(root); + menu->addAction(markAllReadAction); + menu->setAsDockMenu(); +} +#endif + //----------------------------------------------------------- // Locale TODO - App only in French now. //----------------------------------------------------------- @@ -1417,4 +1442,15 @@ float App::getScreenRatio() const { void App::setScreenRatio(float ratio) { mScreenRatio = ratio; +} + +QAction *App::createMarkAsReadAction(QQuickWindow *window) { + QAction *markAllReadAction = new QAction(tr("mark_all_read_action"), window); + window->connect(markAllReadAction, &QAction::triggered, this, [this] { + lDebug() << "Mark all as read"; + emit mAccountList->lResetMissedCalls(); + emit mAccountList->lResetUnreadMessages(); + mCoreModelConnection->invokeToModel([this]() { CoreModel::getInstance()->unreadNotificationsChanged(); }); + }); + return markAllReadAction; } \ No newline at end of file diff --git a/Linphone/core/App.hpp b/Linphone/core/App.hpp index 615d80b17..1b1771e3f 100644 --- a/Linphone/core/App.hpp +++ b/Linphone/core/App.hpp @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -189,6 +190,8 @@ signals: private: void createCommandParser(); + QAction *createMarkAsReadAction(QQuickWindow *window); + void setMacOSDockActions(); // Should only be called on MacOS void setAutoStart(bool enabled); void setLocale(QString configLocale); diff --git a/Linphone/core/account/AccountCore.cpp b/Linphone/core/account/AccountCore.cpp index a008480b9..84f4de8d4 100644 --- a/Linphone/core/account/AccountCore.cpp +++ b/Linphone/core/account/AccountCore.cpp @@ -256,6 +256,14 @@ void AccountCore::setSelf(QSharedPointer me) { mAccountModelConnection->makeConnectToCore(&AccountCore::lResetMissedCalls, [this]() { mAccountModelConnection->invokeToModel([this]() { mAccountModel->resetMissedCallsCount(); }); }); + mAccountModelConnection->makeConnectToCore(&AccountCore::lResetUnreadMessages, [this]() { + mAccountModelConnection->invokeToModel([this]() { + auto chatRooms = mAccountModel->getChatRooms(); + for (auto const &chatRoom : chatRooms) { + chatRoom->markAsRead(); + } + }); + }); mAccountModelConnection->makeConnectToCore(&AccountCore::lRefreshNotifications, [this]() { mAccountModelConnection->invokeToModel([this]() { mAccountModel->refreshUnreadNotifications(); }); }); diff --git a/Linphone/core/account/AccountList.cpp b/Linphone/core/account/AccountList.cpp index ce3cf4afa..83b5d2caf 100644 --- a/Linphone/core/account/AccountList.cpp +++ b/Linphone/core/account/AccountList.cpp @@ -170,6 +170,18 @@ void AccountList::setInitialized(bool init) { } } +void AccountList::lResetMissedCalls() { + for (auto &accountCore : getSharedList()) { + accountCore->lResetMissedCalls(); + } +} + +void AccountList::lResetUnreadMessages() { + for (auto &accountCore : getSharedList()) { + emit accountCore->lResetUnreadMessages(); + } +} + QVariant AccountList::data(const QModelIndex &index, int role) const { int row = index.row(); if (!index.isValid() || row < 0 || row >= mList.count()) return QVariant(); diff --git a/Linphone/core/account/AccountList.hpp b/Linphone/core/account/AccountList.hpp index c0eb0f520..43ba5cfe0 100644 --- a/Linphone/core/account/AccountList.hpp +++ b/Linphone/core/account/AccountList.hpp @@ -51,6 +51,8 @@ public: bool isInitialized() const; void setInitialized(bool init); + void lResetMissedCalls(); // Reset missed calls of all accounts + void lResetUnreadMessages(); // Reset unread messages of all accounts virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; signals: diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index eeaa9022b..943ee0177 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -634,98 +634,104 @@ App - + remote_provisioning_dialog Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? Möchten Sie die Remote-Konfiguration von dieser Adresse herunterladen und anwenden? - - + + info_popup_error_title Error - - + + info_popup_configuration_failed_message Remote provisioning failed : %1 - + configuration_error_detail not reachable - + application_description "A free and open source SIP video-phone." Ein kostenloses Open-Source SIP Video-Telefon. - + command_line_arg_order "Send an order to the application towards a command line" Kommandozeilen-Befehl an die Anwendung schicken - + command_line_option_show_help Zeige Hilfe - + command_line_option_show_app_version Zeige App-Version - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, Pfad oder Datei - + command_line_option_minimized - + command_line_option_log_to_stdout Debug-Informationen auf der Standardausgabe ausgeben - + command_line_option_print_app_logs_only "Print only logs from the application" Nur Anwendungs-Logs ausgeben - + hide_action "Cacher" "Afficher" Ausblenden - + show_action Zeigen - + quit_action "Quitter" Beenden + + + mark_all_read_action + "Mark all as read" + + AuthenticationDialog @@ -2830,13 +2836,13 @@ Error ContactListView - + shrink_accessible_name Shrink %1 - + expand_accessible_name Expand %1 @@ -2980,26 +2986,26 @@ Error Zurzeit keine Kontakte - + more_info_accessible_name More info %1 - + expand_accessible_name Expand %1 - + shrink_accessible_name Shrink %1 - - + + contact_details_edit Edit ---------- @@ -3007,19 +3013,19 @@ Error Bearbeiten - + contact_call_action "Appel" Anrufen - + contact_message_action "Message" Nachricht - + contact_video_call_action "Appel vidéo" Videoanruf @@ -3045,133 +3051,133 @@ Error Offline - + contact_details_numbers_and_addresses_title "Coordonnées" Kontaktinformationen - + call_adress_accessible_name Call address %1 - + contact_details_company_name "Société :" Unternehmen : - + contact_details_job_title "Poste :" Beruf : - + contact_details_medias_title "Medias" Medien - - + + contact_details_medias_subtitle "Afficher les medias partagés" Geteilte Medien anzeigen - + contact_details_trust_title "Confiance" Vertrauen - + contact_dialog_devices_trust_title "Niveau de confiance - Appareils vérifiés" Vertrauenslevel - Verifizierte Geräte - + contact_details_no_device_found "Aucun appareil" Kein Gerät - + contact_device_without_name "Appareil inconnu" Unbekanntes Gerät - + contact_make_call_check_device_trust "Vérifier" Überprüfen - + verify_device_accessible_name Verify %1 device - + contact_details_actions_title "Autres actions" Weitere Aktionen - + contact_details_remove_from_favourites "Retirer des favoris" Aus Favoriten entfernen - + contact_details_add_to_favourites "Ajouter aux favoris" Zu Favoriten hinzufügen - + contact_details_share "Partager" Teilen - + information_popup_error_title Fehler - + contact_details_share_error_mesage "La création du fichier vcard a échoué" VCard-Erstellung fehlgeschlagen - + contact_details_share_success_title "VCard créée" VCard erstellt - + contact_details_share_success_mesage "VCard du contact enregistrée dans %1" VCard wurde in %1 gespeichert - + contact_details_share_email_title "Partage de contact" Kontakt teilen - + contact_details_delete "Supprimer ce contact" Kontakt löschen @@ -7409,7 +7415,7 @@ Failed to create 1-1 conversation with %1 ! utils - + formatYears '%1 year' @@ -7418,7 +7424,7 @@ Failed to create 1-1 conversation with %1 ! - + formatMonths '%1 month' @@ -7427,7 +7433,7 @@ Failed to create 1-1 conversation with %1 ! - + formatWeeks '%1 week' @@ -7436,7 +7442,7 @@ Failed to create 1-1 conversation with %1 ! - + formatDays '%1 day' @@ -7445,7 +7451,7 @@ Failed to create 1-1 conversation with %1 ! - + formatHours '%1 hour' @@ -7454,7 +7460,7 @@ Failed to create 1-1 conversation with %1 ! - + formatMinutes '%1 minute' @@ -7463,7 +7469,7 @@ Failed to create 1-1 conversation with %1 ! - + formatSeconds '%1 second' @@ -7472,62 +7478,62 @@ Failed to create 1-1 conversation with %1 ! - + codec_install "Installation de codec" Codec-Installation - + download_codec "Télécharger le codec %1 (%2) ?" Codec %1 (%2) herunterladen? - + information_popup_success_title "Succès" Erfolg - + information_popup_codec_install_success_text "Le codec a été installé avec succès." Der Codec wurde erfolgreich installiert. - - - + + + information_popup_error_title Fehler - + information_popup_codec_install_error_text "Le codec n'a pas pu être installé." Der Codec konnte nicht installiert werden. - + information_popup_codec_save_error_text "Le codec n'a pas pu être sauvegardé." Der Codec konnte nicht gespeichert werden. - + information_popup_codec_download_error_text "Le codec n'a pas pu être téléchargé." Der Codec konnte nicht heruntergeladen werden. - + loading_popup_codec_install_progress "Téléchargement en cours …" Download läuft … - + okButton Ok diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index f09b309c5..61dbde307 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -634,98 +634,104 @@ App - + remote_provisioning_dialog Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? Do you want to download and apply remote provisioning from this address ? - - + + info_popup_error_title Error Error - - + + info_popup_configuration_failed_message Remote provisioning failed : %1 Remote provisioning failed : %1 - + configuration_error_detail not reachable not reachable - + application_description "A free and open source SIP video-phone." A free and open source SIP video-phone. - + command_line_arg_order "Send an order to the application towards a command line" Send an order to the application towards a command line - + command_line_option_show_help Show this help - + command_line_option_show_app_version Show app version - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Specify the linphone configuration file to be fetched. It will be merged with the current configuration. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, path or file - + command_line_option_minimized Minimize - + command_line_option_log_to_stdout Log to stdout some debug information while running - + command_line_option_print_app_logs_only "Print only logs from the application" Print only logs from the application - + hide_action "Cacher" "Afficher" Hide - + show_action Show - + quit_action "Quitter" Quit + + + mark_all_read_action + "Mark all as read" + Mark all as read + AuthenticationDialog @@ -2764,13 +2770,13 @@ Only your correspondent can decrypt them. ContactListView - + shrink_accessible_name Shrink %1 Shrink %1 - + expand_accessible_name Expand %1 Expand %1 @@ -2908,13 +2914,13 @@ Only your correspondent can decrypt them. No contact at the moment - + expand_accessible_name Expand %1 Expand %1 - + shrink_accessible_name Shrink %1 Shrink %1 @@ -2926,14 +2932,14 @@ Only your correspondent can decrypt them. Create new contact - + more_info_accessible_name More info %1 More info %1 - - + + contact_details_edit Edit ---------- @@ -2941,151 +2947,151 @@ Only your correspondent can decrypt them. Edit - + contact_call_action "Appel" Call - + contact_message_action "Message" Message - + contact_video_call_action "Appel vidéo" Video call - + contact_details_numbers_and_addresses_title "Coordonnées" Contact details - + call_adress_accessible_name Call address %1 Call address %1 - + contact_details_company_name "Société :" Company : - + contact_details_job_title "Poste :" Job : - + contact_details_medias_title "Medias" Medias - - + + contact_details_medias_subtitle "Afficher les medias partagés" Show shared media - + contact_details_trust_title "Confiance" Trust - + contact_dialog_devices_trust_title "Niveau de confiance - Appareils vérifiés" Trust Level - Verified Devices - + contact_details_no_device_found "Aucun appareil" No device - + contact_device_without_name "Appareil inconnu" Unknown device - + contact_make_call_check_device_trust "Vérifier" Verify - + verify_device_accessible_name Verify %1 device Verify %1 device - + contact_details_actions_title "Autres actions" Other actions - + contact_details_remove_from_favourites "Retirer des favoris" Remove from favorites - + contact_details_add_to_favourites "Ajouter aux favoris" Add to favorites - + contact_details_share "Partager" Share - + information_popup_error_title Error - + contact_details_share_error_mesage "La création du fichier vcard a échoué" VCard creation failed - + contact_details_share_success_title "VCard créée" VCard created - + contact_details_share_success_mesage "VCard du contact enregistrée dans %1" VCard has been saved in %1 - + contact_details_share_email_title "Partage de contact" Share contact - + contact_details_delete "Supprimer ce contact" Delete contact @@ -7294,7 +7300,7 @@ Failed to create 1-1 conversation with %1 ! utils - + formatYears '%1 year' @@ -7303,7 +7309,7 @@ Failed to create 1-1 conversation with %1 ! - + formatMonths '%1 month' @@ -7312,7 +7318,7 @@ Failed to create 1-1 conversation with %1 ! - + formatWeeks '%1 week' @@ -7321,7 +7327,7 @@ Failed to create 1-1 conversation with %1 ! - + formatDays '%1 day' @@ -7330,7 +7336,7 @@ Failed to create 1-1 conversation with %1 ! - + formatHours '%1 hour' @@ -7339,7 +7345,7 @@ Failed to create 1-1 conversation with %1 ! - + formatMinutes '%1 minute' @@ -7348,7 +7354,7 @@ Failed to create 1-1 conversation with %1 ! - + formatSeconds '%1 second' @@ -7357,62 +7363,62 @@ Failed to create 1-1 conversation with %1 ! - + codec_install "Installation de codec" Codec installation - + download_codec "Télécharger le codec %1 (%2) ?" Download codec %1 (%2) ? - + information_popup_success_title "Succès" Success - + information_popup_codec_install_success_text "Le codec a été installé avec succès." The codec has been successfully installed. - - - + + + information_popup_error_title Error - + information_popup_codec_install_error_text "Le codec n'a pas pu être installé." The codec could not be installed. - + information_popup_codec_save_error_text "Le codec n'a pas pu être sauvegardé." The codec could not be saved. - + information_popup_codec_download_error_text "Le codec n'a pas pu être téléchargé." The codec could not be downloaded. - + loading_popup_codec_install_progress "Téléchargement en cours …" Download in progress… - + okButton Ok diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index 226c9cf13..49a22d911 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -634,98 +634,104 @@ App - + remote_provisioning_dialog Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? - - + + info_popup_error_title Error Erreur - - + + info_popup_configuration_failed_message Remote provisioning failed : %1 La configuration distante a échoué : %1 - + configuration_error_detail not reachable indisponible - + application_description "A free and open source SIP video-phone." A free and open source SIP video-phone. - + command_line_arg_order "Send an order to the application towards a command line" Send an order to the application towards a command line - + command_line_option_show_help Show this help - + command_line_option_show_app_version Afficher la version de l'application - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Specify the linphone configuration file to be fetched. It will be merged with the current configuration. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, path or file - + command_line_option_minimized Minimiser - + command_line_option_log_to_stdout Log to stdout some debug information while running - + command_line_option_print_app_logs_only "Print only logs from the application" Print only logs from the application - + hide_action "Cacher" "Afficher" Cacher - + show_action Afficher - + quit_action "Quitter" Quitter + + + mark_all_read_action + "Mark all as read" + Marquer tout comme lu + AuthenticationDialog @@ -2764,13 +2770,13 @@ en bout. Seul votre correspondant peut les déchiffrer. ContactListView - + shrink_accessible_name Shrink %1 Réduire %1 - + expand_accessible_name Expand %1 Étendre %1 @@ -2908,13 +2914,13 @@ en bout. Seul votre correspondant peut les déchiffrer. Aucun contact pour le moment - + expand_accessible_name Expand %1 Étendre %1 - + shrink_accessible_name Shrink %1 Réduire %1 @@ -2926,14 +2932,14 @@ en bout. Seul votre correspondant peut les déchiffrer. Créer un nouveau contact - + more_info_accessible_name More info %1 Plus d'information %1 - - + + contact_details_edit Edit ---------- @@ -2941,151 +2947,151 @@ en bout. Seul votre correspondant peut les déchiffrer. Éditer - + contact_call_action "Appel" Appel - + contact_message_action "Message" Message - + contact_video_call_action "Appel vidéo" Appel vidéo - + contact_details_numbers_and_addresses_title "Coordonnées" Coordonnées - + call_adress_accessible_name Call address %1 Appeller l'adresse %1 - + contact_details_company_name "Société :" Société : - + contact_details_job_title "Poste :" Poste : - + contact_details_medias_title "Medias" Medias - - + + contact_details_medias_subtitle "Afficher les medias partagés" Afficher les medias partagés - + contact_details_trust_title "Confiance" Confiance - + contact_dialog_devices_trust_title "Niveau de confiance - Appareils vérifiés" Niveau de confiance - Appareils vérifiés - + contact_details_no_device_found "Aucun appareil" Aucun appareil - + contact_device_without_name "Appareil inconnu" Appareil inconnu - + contact_make_call_check_device_trust "Vérifier" Vérifier - + verify_device_accessible_name Verify %1 device Vérifier l'appareil %1 - + contact_details_actions_title "Autres actions" Autres actions - + contact_details_remove_from_favourites "Retirer des favoris" Retirer des favoris - + contact_details_add_to_favourites "Ajouter aux favoris" Ajouter aux favoris - + contact_details_share "Partager" Partager - + information_popup_error_title Erreur - + contact_details_share_error_mesage "La création du fichier vcard a échoué" La création du fichier vcard a échoué - + contact_details_share_success_title "VCard créée" VCard créée - + contact_details_share_success_mesage "VCard du contact enregistrée dans %1" VCard du contact enregistrée dans %1 - + contact_details_share_email_title "Partage de contact" Partage de contact - + contact_details_delete "Supprimer ce contact" Supprimer ce contact @@ -7294,7 +7300,7 @@ Failed to create 1-1 conversation with %1 ! utils - + formatYears '%1 year' @@ -7303,7 +7309,7 @@ Failed to create 1-1 conversation with %1 ! - + formatMonths '%1 month' @@ -7312,7 +7318,7 @@ Failed to create 1-1 conversation with %1 ! - + formatWeeks '%1 week' @@ -7321,7 +7327,7 @@ Failed to create 1-1 conversation with %1 ! - + formatDays '%1 day' @@ -7330,7 +7336,7 @@ Failed to create 1-1 conversation with %1 ! - + formatHours '%1 hour' @@ -7339,7 +7345,7 @@ Failed to create 1-1 conversation with %1 ! - + formatMinutes '%1 minute' @@ -7348,7 +7354,7 @@ Failed to create 1-1 conversation with %1 ! - + formatSeconds '%1 second' @@ -7357,62 +7363,62 @@ Failed to create 1-1 conversation with %1 ! - + codec_install "Installation de codec" Installation de codec - + download_codec "Télécharger le codec %1 (%2) ?" Télécharger le codec %1 (%2) ? - + information_popup_success_title "Succès" Succès - + information_popup_codec_install_success_text "Le codec a été installé avec succès." Le codec a été installé avec succès. - - - + + + information_popup_error_title Erreur - + information_popup_codec_install_error_text "Le codec n'a pas pu être installé." Le codec n'a pas pu être installé. - + information_popup_codec_save_error_text "Le codec n'a pas pu être sauvegardé." Le codec n'a pas pu être sauvegardé. - + information_popup_codec_download_error_text "Le codec n'a pas pu être téléchargé." Le codec n'a pas pu être téléchargé. - + loading_popup_codec_install_progress "Téléchargement en cours …" Téléchargement en cours… - + okButton Ok diff --git a/Linphone/model/account/AccountModel.cpp b/Linphone/model/account/AccountModel.cpp index 3853fa1a7..e47b10a9f 100644 --- a/Linphone/model/account/AccountModel.cpp +++ b/Linphone/model/account/AccountModel.cpp @@ -603,3 +603,7 @@ bool AccountModel::forwardToVoiceMailInDndPresence() { auto core = CoreModel::getInstance()->getCore(); return core->getConfig()->getBool(accountSection, "forward_to_voicemail_in_dnd_presence", false); } + +std::list> AccountModel::getChatRooms() { + return mMonitor->getChatRooms(); +} \ No newline at end of file diff --git a/Linphone/model/account/AccountModel.hpp b/Linphone/model/account/AccountModel.hpp index 1ac92ec00..1a3901157 100644 --- a/Linphone/model/account/AccountModel.hpp +++ b/Linphone/model/account/AccountModel.hpp @@ -90,6 +90,7 @@ public: void setPresence(LinphoneEnums::Presence presence, bool userInitiated, bool resetToAuto, QString presenceNote); std::string configAccountSection(); bool forwardToVoiceMailInDndPresence(); + std::list> getChatRooms(); signals: void registrationStateChanged(const std::shared_ptr &account,