mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Store call history list in app
This commit is contained in:
parent
4a0cdc7f1a
commit
e3a1493ceb
7 changed files with 68 additions and 48 deletions
|
|
@ -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<ConferenceInfoList> data) {
|
|||
}
|
||||
}
|
||||
|
||||
QSharedPointer<CallHistoryList> App::getCallHistoryList() const {
|
||||
return mCallHistoryList;
|
||||
}
|
||||
void App::setCallHistoryList(QSharedPointer<CallHistoryList> data) {
|
||||
if (mCallHistoryList != data) {
|
||||
mCallHistoryList = data;
|
||||
emit callHistoryChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QSharedPointer<ChatList> App::getChatList() const {
|
||||
return mChatList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <QSharedPointer>
|
||||
|
||||
#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<ConferenceInfoList> getConferenceInfoList() const;
|
||||
void setConferenceInfoList(QSharedPointer<ConferenceInfoList> data);
|
||||
|
||||
QSharedPointer<CallHistoryList> getCallHistoryList() const;
|
||||
void setCallHistoryList(QSharedPointer<CallHistoryList> data);
|
||||
|
||||
QSharedPointer<ChatList> getChatList() const;
|
||||
ChatList *getChats() const;
|
||||
void setChatList(QSharedPointer<ChatList> 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<ConferenceInfoList> mConferenceInfoList;
|
||||
QSharedPointer<ChatList> mChatList;
|
||||
QSharedPointer<CallList> mCallList;
|
||||
QSharedPointer<CallHistoryList> mCallHistoryList;
|
||||
QSharedPointer<SafeConnection<App, CoreModel>> mCoreModelConnection;
|
||||
QSharedPointer<SafeConnection<App, CliModel>> mCliModelConnection;
|
||||
bool mAutoStart = false;
|
||||
|
|
|
|||
|
|
@ -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(); });
|
||||
|
|
|
|||
|
|
@ -735,80 +735,80 @@
|
|||
<translation>nicht erreichbar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1001"/>
|
||||
<location filename="../../core/App.cpp" line="1002"/>
|
||||
<source>application_description</source>
|
||||
<extracomment>"A free and open source SIP video-phone."</extracomment>
|
||||
<translation>Ein kostenloses Open-Source SIP Video-Telefon.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1003"/>
|
||||
<location filename="../../core/App.cpp" line="1004"/>
|
||||
<source>command_line_arg_order</source>
|
||||
<extracomment>"Send an order to the application towards a command line"</extracomment>
|
||||
<translation>Kommandozeilen-Befehl an die Anwendung schicken</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1007"/>
|
||||
<location filename="../../core/App.cpp" line="1008"/>
|
||||
<source>command_line_option_show_help</source>
|
||||
<translation>Zeige Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1012"/>
|
||||
<location filename="../../core/App.cpp" line="1013"/>
|
||||
<source>command_line_option_show_app_version</source>
|
||||
<translation>App-Version anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1020"/>
|
||||
<location filename="../../core/App.cpp" line="1021"/>
|
||||
<source>command_line_option_config_to_fetch</source>
|
||||
<extracomment>"Specify the linphone configuration file to be fetched. It will be merged with the current configuration."</extracomment>
|
||||
<translation>Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1022"/>
|
||||
<location filename="../../core/App.cpp" line="1023"/>
|
||||
<source>command_line_option_config_to_fetch_arg</source>
|
||||
<extracomment>"URL, path or file"</extracomment>
|
||||
<translation>URL, Pfad oder Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1027"/>
|
||||
<location filename="../../core/App.cpp" line="1028"/>
|
||||
<source>command_line_option_minimized</source>
|
||||
<translation>Minimieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1030"/>
|
||||
<location filename="../../core/App.cpp" line="1031"/>
|
||||
<source>command_line_option_log_to_stdout</source>
|
||||
<translation>Debug-Informationen auf der Standardausgabe ausgeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1033"/>
|
||||
<location filename="../../core/App.cpp" line="1034"/>
|
||||
<source>command_line_option_print_app_logs_only</source>
|
||||
<extracomment>"Print only logs from the application"</extracomment>
|
||||
<translation>Nur Anwendungs-Logs ausgeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1479"/>
|
||||
<location filename="../../core/App.cpp" line="1490"/>
|
||||
<source>hide_action</source>
|
||||
<extracomment>"Cacher" "Afficher"</extracomment>
|
||||
<translation>Ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1479"/>
|
||||
<location filename="../../core/App.cpp" line="1490"/>
|
||||
<source>show_action</source>
|
||||
<translation>Zeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1494"/>
|
||||
<location filename="../../core/App.cpp" line="1505"/>
|
||||
<source>quit_action</source>
|
||||
<extracomment>"Quitter"</extracomment>
|
||||
<translation>Beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1512"/>
|
||||
<location filename="../../core/App.cpp" line="1523"/>
|
||||
<source>check_for_update</source>
|
||||
<extracomment>Check for update</extracomment>
|
||||
<translation>Auf Updates prüfen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1635"/>
|
||||
<location filename="../../core/App.cpp" line="1646"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Alle als gelesen markieren</translation>
|
||||
</message>
|
||||
|
|
@ -1026,7 +1026,7 @@
|
|||
<context>
|
||||
<name>CallHistoryListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Call/CallHistoryListView.qml" line="206"/>
|
||||
<location filename="../../view/Control/Display/Call/CallHistoryListView.qml" line="204"/>
|
||||
<source>call_name_accessible_button</source>
|
||||
<extracomment>Call %1</extracomment>
|
||||
<translation>Anruf %1</translation>
|
||||
|
|
|
|||
|
|
@ -716,80 +716,80 @@
|
|||
<translation>not reachable</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1001"/>
|
||||
<location filename="../../core/App.cpp" line="1002"/>
|
||||
<source>application_description</source>
|
||||
<extracomment>"A free and open source SIP video-phone."</extracomment>
|
||||
<translation>A free and open source SIP video-phone.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1003"/>
|
||||
<location filename="../../core/App.cpp" line="1004"/>
|
||||
<source>command_line_arg_order</source>
|
||||
<extracomment>"Send an order to the application towards a command line"</extracomment>
|
||||
<translation>Send an order to the application towards a command line</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1007"/>
|
||||
<location filename="../../core/App.cpp" line="1008"/>
|
||||
<source>command_line_option_show_help</source>
|
||||
<translation>Show this help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1012"/>
|
||||
<location filename="../../core/App.cpp" line="1013"/>
|
||||
<source>command_line_option_show_app_version</source>
|
||||
<translation>Show app version</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1020"/>
|
||||
<location filename="../../core/App.cpp" line="1021"/>
|
||||
<source>command_line_option_config_to_fetch</source>
|
||||
<extracomment>"Specify the linphone configuration file to be fetched. It will be merged with the current configuration."</extracomment>
|
||||
<translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1022"/>
|
||||
<location filename="../../core/App.cpp" line="1023"/>
|
||||
<source>command_line_option_config_to_fetch_arg</source>
|
||||
<extracomment>"URL, path or file"</extracomment>
|
||||
<translation>URL, path or file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1027"/>
|
||||
<location filename="../../core/App.cpp" line="1028"/>
|
||||
<source>command_line_option_minimized</source>
|
||||
<translation>Minimize</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1030"/>
|
||||
<location filename="../../core/App.cpp" line="1031"/>
|
||||
<source>command_line_option_log_to_stdout</source>
|
||||
<translation>Log to stdout some debug information while running</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1033"/>
|
||||
<location filename="../../core/App.cpp" line="1034"/>
|
||||
<source>command_line_option_print_app_logs_only</source>
|
||||
<extracomment>"Print only logs from the application"</extracomment>
|
||||
<translation>Print only logs from the application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1479"/>
|
||||
<location filename="../../core/App.cpp" line="1490"/>
|
||||
<source>hide_action</source>
|
||||
<extracomment>"Cacher" "Afficher"</extracomment>
|
||||
<translation>Hide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1479"/>
|
||||
<location filename="../../core/App.cpp" line="1490"/>
|
||||
<source>show_action</source>
|
||||
<translation>Show</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1494"/>
|
||||
<location filename="../../core/App.cpp" line="1505"/>
|
||||
<source>quit_action</source>
|
||||
<extracomment>"Quitter"</extracomment>
|
||||
<translation>Quit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1512"/>
|
||||
<location filename="../../core/App.cpp" line="1523"/>
|
||||
<source>check_for_update</source>
|
||||
<extracomment>Check for update</extracomment>
|
||||
<translation>Check for update</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1635"/>
|
||||
<location filename="../../core/App.cpp" line="1646"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Marquer tout comme lu</translation>
|
||||
</message>
|
||||
|
|
@ -1007,7 +1007,7 @@
|
|||
<context>
|
||||
<name>CallHistoryListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Call/CallHistoryListView.qml" line="206"/>
|
||||
<location filename="../../view/Control/Display/Call/CallHistoryListView.qml" line="204"/>
|
||||
<source>call_name_accessible_button</source>
|
||||
<extracomment>Call %1</extracomment>
|
||||
<translation>Call %1</translation>
|
||||
|
|
|
|||
|
|
@ -711,80 +711,80 @@
|
|||
<translation>indisponible</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1001"/>
|
||||
<location filename="../../core/App.cpp" line="1002"/>
|
||||
<source>application_description</source>
|
||||
<extracomment>"A free and open source SIP video-phone."</extracomment>
|
||||
<translation>A free and open source SIP video-phone.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1003"/>
|
||||
<location filename="../../core/App.cpp" line="1004"/>
|
||||
<source>command_line_arg_order</source>
|
||||
<extracomment>"Send an order to the application towards a command line"</extracomment>
|
||||
<translation>Send an order to the application towards a command line</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1007"/>
|
||||
<location filename="../../core/App.cpp" line="1008"/>
|
||||
<source>command_line_option_show_help</source>
|
||||
<translation>Show this help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1012"/>
|
||||
<location filename="../../core/App.cpp" line="1013"/>
|
||||
<source>command_line_option_show_app_version</source>
|
||||
<translation>Afficher la version de l'application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1020"/>
|
||||
<location filename="../../core/App.cpp" line="1021"/>
|
||||
<source>command_line_option_config_to_fetch</source>
|
||||
<extracomment>"Specify the linphone configuration file to be fetched. It will be merged with the current configuration."</extracomment>
|
||||
<translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1022"/>
|
||||
<location filename="../../core/App.cpp" line="1023"/>
|
||||
<source>command_line_option_config_to_fetch_arg</source>
|
||||
<extracomment>"URL, path or file"</extracomment>
|
||||
<translation>URL, path or file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1027"/>
|
||||
<location filename="../../core/App.cpp" line="1028"/>
|
||||
<source>command_line_option_minimized</source>
|
||||
<translation>Minimiser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1030"/>
|
||||
<location filename="../../core/App.cpp" line="1031"/>
|
||||
<source>command_line_option_log_to_stdout</source>
|
||||
<translation>Log to stdout some debug information while running</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1033"/>
|
||||
<location filename="../../core/App.cpp" line="1034"/>
|
||||
<source>command_line_option_print_app_logs_only</source>
|
||||
<extracomment>"Print only logs from the application"</extracomment>
|
||||
<translation>Print only logs from the application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1479"/>
|
||||
<location filename="../../core/App.cpp" line="1490"/>
|
||||
<source>hide_action</source>
|
||||
<extracomment>"Cacher" "Afficher"</extracomment>
|
||||
<translation>Cacher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1479"/>
|
||||
<location filename="../../core/App.cpp" line="1490"/>
|
||||
<source>show_action</source>
|
||||
<translation>Afficher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1494"/>
|
||||
<location filename="../../core/App.cpp" line="1505"/>
|
||||
<source>quit_action</source>
|
||||
<extracomment>"Quitter"</extracomment>
|
||||
<translation>Quitter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1512"/>
|
||||
<location filename="../../core/App.cpp" line="1523"/>
|
||||
<source>check_for_update</source>
|
||||
<extracomment>Check for update</extracomment>
|
||||
<translation>Rechercher une mise à jour</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1635"/>
|
||||
<location filename="../../core/App.cpp" line="1646"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Marquer tout comme lu</translation>
|
||||
</message>
|
||||
|
|
@ -982,7 +982,7 @@
|
|||
<context>
|
||||
<name>CallHistoryListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Call/CallHistoryListView.qml" line="206"/>
|
||||
<location filename="../../view/Control/Display/Call/CallHistoryListView.qml" line="204"/>
|
||||
<source>call_name_accessible_button</source>
|
||||
<extracomment>Call %1</extracomment>
|
||||
<translation>Appeler %1</translation>
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue