diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index c8e9c1f06..374fa7a56 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -417,7 +417,10 @@ void App::setSelf(QSharedPointer(me)) { }); mCoreModelConnection->makeConnectToModel(&CoreModel::defaultAccountChanged, [this] { int n = mEventCountNotifier->getCurrentEventCount(); - mCoreModelConnection->invokeToCore([this, n] { mEventCountNotifier->notifyEventCount(n); }); + mCoreModelConnection->invokeToCore([this, n] { + mEventCountNotifier->notifyEventCount(n); + emit defaultAccountChanged(); + }); }); //--------------------------------------------------------------------------------------------- diff --git a/Linphone/core/App.hpp b/Linphone/core/App.hpp index e358b6b9f..a9033b3a6 100644 --- a/Linphone/core/App.hpp +++ b/Linphone/core/App.hpp @@ -182,6 +182,7 @@ signals: void mainWindowChanged(); void coreStartedChanged(bool coreStarted); void accountsChanged(); + void defaultAccountChanged(); void callsChanged(); void currentDateChanged(); // void executeCommand(QString command); diff --git a/Linphone/core/participant/ParticipantInfoProxy.cpp b/Linphone/core/participant/ParticipantInfoProxy.cpp index 1428b19c9..94c55e3d1 100644 --- a/Linphone/core/participant/ParticipantInfoProxy.cpp +++ b/Linphone/core/participant/ParticipantInfoProxy.cpp @@ -44,7 +44,7 @@ ChatGui *ParticipantInfoProxy::getChat() const { } void ParticipantInfoProxy::setChat(ChatGui *chat) { - lDebug() << "[ParticipantInfoProxy] set current chat " << this << " => " << chat; + lDebug() << "[ParticipantInfoProxy] set current chat " << chat; if (mChat != chat) { mChat = chat; mParticipants->setChatCore(chat ? chat->mCore : nullptr); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 2732c63b0..2d5df1042 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -530,87 +530,87 @@ - + 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 diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 8d2e1a215..abd4f54d7 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -530,87 +530,87 @@ - + 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 diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index cb028921a..39688cca1 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -530,87 +530,87 @@ - + 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 diff --git a/Linphone/view/Page/Main/Chat/ChatPage.qml b/Linphone/view/Page/Main/Chat/ChatPage.qml index e6c7dfd18..e94f38d72 100644 --- a/Linphone/view/Page/Main/Chat/ChatPage.qml +++ b/Linphone/view/Page/Main/Chat/ChatPage.qml @@ -346,6 +346,14 @@ AbstractMainPage { onChatChanged: { if (mainItem.selectedChatGui !== chat) mainItem.selectedChatGui = chat } + // Reset current chat when switching account, otherwise the binding makes + // the last chat from last account the current chat for the new default account + Connections { + target: AppCpp + function onDefaultAccountChanged() { + selectedChatView.chat = null + } + } // Binding is destroyed when forward message is done so // we need this connection in addition Connections {