diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index d3df558a3..f24f06c37 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -972,6 +972,7 @@ void App::restart() { mIsRestarting = true; if (mAccountList) mAccountList->resetData(); if (mCallList) mCallList->resetData(); + if (mCallHistoryList) mCallHistoryList->resetData(); if (mChatList) mChatList->resetData(); if (mConferenceInfoList) mConferenceInfoList->resetData(); closeCallsWindow(); @@ -1234,6 +1235,16 @@ void App::setConferenceInfoList(QSharedPointer data) { } } +QSharedPointer App::getCallHistoryList() const { + return mCallHistoryList; +} +void App::setCallHistoryList(QSharedPointer data) { + if (mCallHistoryList != data) { + mCallHistoryList = data; + emit callHistoryChanged(); + } +} + QSharedPointer App::getChatList() const { return mChatList; } diff --git a/Linphone/core/App.hpp b/Linphone/core/App.hpp index 8de4ce16f..1c6fc2ec9 100644 --- a/Linphone/core/App.hpp +++ b/Linphone/core/App.hpp @@ -24,6 +24,7 @@ #include #include "core/account/AccountProxy.hpp" +#include "core/call-history/CallHistoryList.hpp" #include "core/call/CallProxy.hpp" #include "core/chat/ChatGui.hpp" #include "core/chat/ChatList.hpp" @@ -163,6 +164,9 @@ public: QSharedPointer getConferenceInfoList() const; void setConferenceInfoList(QSharedPointer data); + QSharedPointer getCallHistoryList() const; + void setCallHistoryList(QSharedPointer data); + QSharedPointer getChatList() const; ChatList *getChats() const; void setChatList(QSharedPointer data); @@ -213,6 +217,7 @@ signals: void currentChatChanged(); void conferenceInfosChanged(); void chatsChanged(); + void callHistoryChanged(); void localeChanged(); // void executeCommand(QString command); @@ -239,6 +244,7 @@ private: QSharedPointer mConferenceInfoList; QSharedPointer mChatList; QSharedPointer mCallList; + QSharedPointer mCallHistoryList; QSharedPointer> mCoreModelConnection; QSharedPointer> mCliModelConnection; bool mAutoStart = false; diff --git a/Linphone/core/call-history/CallHistoryProxy.cpp b/Linphone/core/call-history/CallHistoryProxy.cpp index 57552f85b..999f4544d 100644 --- a/Linphone/core/call-history/CallHistoryProxy.cpp +++ b/Linphone/core/call-history/CallHistoryProxy.cpp @@ -27,6 +27,11 @@ DEFINE_ABSTRACT_OBJECT(CallHistoryProxy) CallHistoryProxy::CallHistoryProxy(QObject *parent) : LimitProxy(parent) { mHistoryList = CallHistoryList::create(); + if (!App::getInstance()->getCallHistoryList()) { + mHistoryList = CallHistoryList::create(); + App::getInstance()->setCallHistoryList(mHistoryList); + } + mHistoryList = App::getInstance()->getCallHistoryList(); connect(mHistoryList.get(), &CallHistoryList::listAboutToBeReset, this, &CallHistoryProxy::listAboutToBeReset); setSourceModels(new SortFilterList(mHistoryList.get(), Qt::DescendingOrder)); connect(App::getInstance(), &App::currentDateChanged, this, [this] { emit mHistoryList->lUpdate(); }); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 793259828..467a7379f 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -735,80 +735,80 @@ nicht erreichbar - + 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 App-Version anzeigen - + 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 Minimieren - + 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 - + check_for_update Check for update Auf Updates prüfen - + mark_all_read_action Alle als gelesen markieren @@ -1026,7 +1026,7 @@ CallHistoryListView - + call_name_accessible_button Call %1 Anruf %1 diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 068bbf642..6a4a9e28e 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -716,80 +716,80 @@ 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 - + check_for_update Check for update Check for update - + mark_all_read_action Marquer tout comme lu @@ -1007,7 +1007,7 @@ CallHistoryListView - + call_name_accessible_button Call %1 Call %1 diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 8cfd139e6..b3e0ddab9 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -711,80 +711,80 @@ 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 - + check_for_update Check for update Rechercher une mise à jour - + mark_all_read_action Marquer tout comme lu @@ -982,7 +982,7 @@ CallHistoryListView - + call_name_accessible_button Call %1 Appeler %1 diff --git a/Linphone/view/Control/Display/Call/CallHistoryListView.qml b/Linphone/view/Control/Display/Call/CallHistoryListView.qml index 4b2c1ab3b..9592d1f39 100644 --- a/Linphone/view/Control/Display/Call/CallHistoryListView.qml +++ b/Linphone/view/Control/Display/Call/CallHistoryListView.qml @@ -26,14 +26,12 @@ ListView { model: CallHistoryProxy { id: callHistoryProxy - Component.onCompleted: { - loading = true - } onListAboutToBeReset: loading = true filterText: mainItem.searchText onFilterTextChanged: maxDisplayItems = initialDisplayItems initialDisplayItems: Math.max(20, Math.round(2 * mainItem.height / Utils.getSizeWithScreenRatio(56))) displayItemsStep: 3 * initialDisplayItems / 2 + onModelAboutToBeReset: loading = true onModelReset: { mainItem.resultsReceived() }