From 013ba607ecf90d6c6c431f1d2a7ec53bd3d19aed Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Wed, 24 Sep 2025 10:05:30 +0200 Subject: [PATCH] FIXES: fix inifnite loop #LINQT-2002 display name: do not modify username ui if there is not display name set by a user remove unused signals fix contact info update chat list #LINQT-1992 send invitations in secured chatrooms #LINQT-1996 extend meeting detail height #LINQT-1999 scrollbar call history #LINQT-1998 do not sort chat list when filtering it #LINQT-2003 remove useless signal which refresh the view for ephemeral messages (fix #LINQT-1989) --- Linphone/core/account/AccountCore.cpp | 9 - Linphone/core/chat/ChatCore.cpp | 69 +++---- Linphone/core/chat/ChatCore.hpp | 2 - Linphone/core/chat/ChatProxy.cpp | 5 +- Linphone/core/chat/message/EventLogList.cpp | 7 - Linphone/data/languages/de.ts | 172 +++++++++--------- Linphone/data/languages/en.ts | 172 +++++++++--------- Linphone/data/languages/fr_FR.ts | 172 +++++++++--------- .../model/conference/ConferenceInfoModel.cpp | 11 +- Linphone/model/tool/ToolModel.cpp | 17 +- .../Container/Call/CallHistoryLayout.qml | 1 - .../Display/Call/CallHistoryListView.qml | 2 - .../Control/Display/Chat/ChatListView.qml | 9 +- .../Display/Chat/ChatMessagesListView.qml | 2 +- .../Page/Layout/Chat/EphemeralSettings.qml | 7 +- Linphone/view/Page/Main/Call/CallPage.qml | 132 +++++++------- .../view/Page/Main/Meeting/MeetingPage.qml | 17 +- 17 files changed, 389 insertions(+), 417 deletions(-) diff --git a/Linphone/core/account/AccountCore.cpp b/Linphone/core/account/AccountCore.cpp index 5c2e3e8f9..042cec3d2 100644 --- a/Linphone/core/account/AccountCore.cpp +++ b/Linphone/core/account/AccountCore.cpp @@ -260,15 +260,6 @@ void AccountCore::setSelf(QSharedPointer me) { mAccountModelConnection->makeConnectToCore(&AccountCore::lRefreshNotifications, [this]() { mAccountModelConnection->invokeToModel([this]() { mAccountModel->refreshUnreadNotifications(); }); }); - mAccountModelConnection->makeConnectToCore(&AccountCore::unreadCallNotificationsChanged, [this]() { - mAccountModelConnection->invokeToModel([this]() { CoreModel::getInstance()->unreadNotificationsChanged(); }); - }); - mAccountModelConnection->makeConnectToCore(&AccountCore::unreadMessageNotificationsChanged, [this]() { - mAccountModelConnection->invokeToModel([this]() { CoreModel::getInstance()->unreadNotificationsChanged(); }); - }); - mAccountModelConnection->makeConnectToCore(&AccountCore::unreadNotificationsChanged, [this]() { - mAccountModelConnection->invokeToModel([this]() { CoreModel::getInstance()->unreadNotificationsChanged(); }); - }); mAccountModelConnection->makeConnectToCore(&AccountCore::lSetDisplayName, [this](QString displayName) { mAccountModelConnection->invokeToModel([this, displayName]() { mAccountModel->setDisplayName(displayName); }); }); diff --git a/Linphone/core/chat/ChatCore.cpp b/Linphone/core/chat/ChatCore.cpp index 978c86ae4..79c54f088 100644 --- a/Linphone/core/chat/ChatCore.cpp +++ b/Linphone/core/chat/ChatCore.cpp @@ -89,24 +89,6 @@ ChatCore::ChatCore(const std::shared_ptr &chatRoom) : QObjec static_cast(linphone::ChatRoom::HistoryFilter::InfoNoDevice) : static_cast(linphone::ChatRoom::HistoryFilter::ChatMessage); - // auto history = chatRoom->getHistory(0, filter); - // std::list> lHistory; - // for (auto &eventLog : history) { - // lHistory.push_back(eventLog); - // } - // QList> eventList; - // for (auto &event : lHistory) { - // auto eventLogCore = EventLogCore::create(event); - // eventList.append(eventLogCore); - // if (auto isMessage = eventLogCore->getChatMessageCore()) { - // for (auto content : isMessage->getChatMessageContentList()) { - // if (content->isFile() && !content->isVoiceRecording()) { - // mFileList.append(content); - // } - // } - // } - // } - // resetEventLogList(eventList); mIdentifier = Utils::coreStringToAppString(chatRoom->getIdentifier()); mChatRoomState = LinphoneEnums::fromLinphone(chatRoom->getState()); mIsEncrypted = chatRoom->hasCapability((int)linphone::ChatRoom::Capabilities::Encrypted); @@ -116,25 +98,9 @@ ChatCore::ChatCore(const std::shared_ptr &chatRoom) : QObjec localAccount && localAccount->getParams() && localAccount->getParams()->getInstantMessagingEncryptionMandatory(); mIsReadOnly = chatRoom->isReadOnly() || (!mIsEncrypted && associatedAccountHasIMEncryptionMandatory); - connect(this, &ChatCore::eventListChanged, this, &ChatCore::lUpdateLastMessage); + connect(this, &ChatCore::eventsInserted, this, &ChatCore::lUpdateLastMessage); - connect(this, &ChatCore::eventRemoved, this, &ChatCore::lUpdateLastMessage); - auto resetFileListLambda = [this] { - QList> fileList; - // for (auto &eventLogCore : mEventLogList) { - // if (auto isMessage = eventLogCore->getChatMessageCore()) { - // for (auto content : isMessage->getChatMessageContentList()) { - // if (content->isFile() && !content->isVoiceRecording()) { - // fileList.append(content); - // } - // } - // } - // } - resetFileList(fileList); - }; - connect(this, &ChatCore::eventListChanged, this, resetFileListLambda); - connect(this, &ChatCore::eventsInserted, this, resetFileListLambda); - connect(this, &ChatCore::eventRemoved, this, resetFileListLambda); + mEphemeralEnabled = chatRoom->ephemeralEnabled(); mEphemeralLifetime = chatRoom->ephemeralEnabled() ? chatRoom->getEphemeralLifetime() : 0; mIsMuted = chatRoom->getMuted(); @@ -674,26 +640,33 @@ void ChatCore::updateInfo(const std::shared_ptr &updatedFriend auto chatroom = mChatModel->getMonitor(); auto chatRoomAddress = chatroom->getPeerAddress(); if (mChatModel->hasCapability((int)linphone::ChatRoom::Capabilities::Basic)) { - mTitle = ToolModel::getDisplayName(chatRoomAddress); - mAvatarUri = ToolModel::getDisplayName(chatRoomAddress); - emit titleChanged(mTitle); - emit avatarUriChanged(); + auto title = ToolModel::getDisplayName(chatRoomAddress); + auto avatarUri = ToolModel::getDisplayName(chatRoomAddress); + mChatModelConnection->invokeToCore([this, title, avatarUri] { + setTitle(title); + setAvatarUri(avatarUri); + }); } else { if (mChatModel->hasCapability((int)linphone::ChatRoom::Capabilities::OneToOne)) { auto participants = chatroom->getParticipants(); if (participants.size() > 0) { auto peer = participants.front(); - if (peer) mTitle = ToolModel::getDisplayName(peer->getAddress()); - mAvatarUri = ToolModel::getDisplayName(peer->getAddress()); - if (participants.size() == 1) { - auto peerAddress = peer->getAddress(); - if (peerAddress) - mParticipantAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly()); + if (peer) { + auto title = ToolModel::getDisplayName(peer->getAddress()); + auto avatarUri = ToolModel::getDisplayName(peer->getAddress()); + mChatModelConnection->invokeToCore([this, title, avatarUri] { + setTitle(title); + setAvatarUri(avatarUri); + }); } } } else if (mChatModel->hasCapability((int)linphone::ChatRoom::Capabilities::Conference)) { - mTitle = Utils::coreStringToAppString(chatroom->getSubject()); - mAvatarUri = Utils::coreStringToAppString(chatroom->getSubject()); + auto title = Utils::coreStringToAppString(chatroom->getSubject()); + auto avatarUri = Utils::coreStringToAppString(chatroom->getSubject()); + mChatModelConnection->invokeToCore([this, title, avatarUri] { + setTitle(title); + setAvatarUri(avatarUri); + }); } } } diff --git a/Linphone/core/chat/ChatCore.hpp b/Linphone/core/chat/ChatCore.hpp index b0ee6b36a..b7620aa77 100644 --- a/Linphone/core/chat/ChatCore.hpp +++ b/Linphone/core/chat/ChatCore.hpp @@ -161,10 +161,8 @@ signals: void lastMessageChanged(); void titleChanged(QString title); void unreadMessagesCountChanged(int count); - void eventListChanged(); void eventListCleared(); void eventsInserted(QList> list); - void eventRemoved(); void avatarUriChanged(); void deleted(); void composingUserChanged(); diff --git a/Linphone/core/chat/ChatProxy.cpp b/Linphone/core/chat/ChatProxy.cpp index 12a82087e..c5a84714a 100644 --- a/Linphone/core/chat/ChatProxy.cpp +++ b/Linphone/core/chat/ChatProxy.cpp @@ -75,14 +75,13 @@ void ChatProxy::addChatInList(ChatGui *chatGui) { } bool ChatProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { - // auto l = getItemAtSource(sourceRow); - // return l != nullptr; return true; } bool ChatProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const { + if (!mFilterText.isEmpty()) return false; auto l = getItemAtSource(sourceLeft.row()); auto r = getItemAtSource(sourceRight.row()); if (l && r) return l->getLastUpdatedTime() >= r->getLastUpdatedTime(); - else return true; + return false; } diff --git a/Linphone/core/chat/message/EventLogList.cpp b/Linphone/core/chat/message/EventLogList.cpp index bdfec0544..b9fd9a496 100644 --- a/Linphone/core/chat/message/EventLogList.cpp +++ b/Linphone/core/chat/message/EventLogList.cpp @@ -78,23 +78,16 @@ void EventLogList::connectItem(const QSharedPointer &item) { if (mChatCore) emit mChatCore->lUpdateLastMessage(); remove(item); }); - connect(message.get(), &ChatMessageCore::ephemeralDurationChanged, this, [this, item](int duration) { - int i; - get(item.get(), &i); - emit dataChanged(index(i), index(i)); - }); } } void EventLogList::setChatCore(QSharedPointer core) { if (mChatCore != core) { if (mChatCore) { - disconnect(mChatCore.get(), &ChatCore::eventListChanged, this, nullptr); disconnect(mChatCore.get(), &ChatCore::eventsInserted, this, nullptr); } mChatCore = core; if (mChatCore) { - connect(mChatCore.get(), &ChatCore::eventListChanged, this, &EventLogList::lUpdate); connect(mChatCore.get(), &ChatCore::eventListCleared, this, [this] { resetData(); }); connect(mChatCore.get(), &ChatCore::eventsInserted, this, [this](QList> list) { auto eventsList = getSharedList(); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 352a8b268..655737fcd 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Verbunden - + drawer_menu_account_connection_status_refreshing Aktualisiere… - + drawer_menu_account_connection_status_progress Verbinde… - + drawer_menu_account_connection_status_failed Fehler - + drawer_menu_account_connection_status_cleared Deaktiviert - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." Sie sind online und erreichbar. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Verbindungsfehler, überprüfen Sie Ihre Einstellungen. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Konto deaktiviert, Sie erhalten keine Anrufe oder Nachrichten. @@ -867,25 +867,25 @@ Offline - + meeting_info_join_title "Rejoindre la réunion" Besprechung beitreten - + contact_call_action "Appel" Anrufen - + contact_message_action "Message" Nachricht - + contact_video_call_action "Appel Video" Videoanruf @@ -1077,7 +1077,7 @@ - + menu_delete_history "Supprimer l'historique" Verlauf löschen @@ -1149,7 +1149,7 @@ - + information_popup_error_title Fehler @@ -1166,55 +1166,55 @@ Sie sind nicht verbunden - + menu_see_existing_contact "Show contact" Kontakt anzeigen - + menu_add_address_to_contacts "Add to contacts" Zu Kontakten hinzufügen - + menu_copy_sip_address "Copier l'adresse SIP" SIP-Adresse kopieren - + sip_address_copied_to_clipboard_toast Adresse copiée SIP-Adresse kopiert - + sip_address_copied_to_clipboard_message L'adresse a été copié dans le presse_papiers Die Adresse wurde in die Zwischenablage kopiert - + sip_address_copy_to_clipboard_error "Erreur lors de la copie de l'adresse" Fehler beim Kopieren der Adresse - + notification_missed_call_title "Appel manqué" Verpasster Anruf - + call_outgoing "Appel sortant" Ausgehender Anruf - + call_audio_incoming "Appel entrant" Eingehender Anruf @@ -1822,13 +1822,13 @@ ChatCore - + info_toast_deleted_title Deleted - + info_toast_deleted_message_history Message history has been deleted @@ -1852,65 +1852,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… - + chat_message_draft_sending_text - + chat_room_delete "Delete" - + chat_room_mute - + chat_room_unmute "Mute" - + chat_room_mark_as_read "Mark as read" - + chat_room_leave "leave" - + chat_list_leave_chat_popup_title leave the conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? - + chat_list_delete_chat_popup_title Delete the conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? @@ -3244,42 +3244,42 @@ Error EphemeralSettings - + title Ephemeral messages - + explanations By enabling ephemeral messages in this chat, messages sent will be automatically deleted after the defined period. - + one_minute 1 minute - + one_hour 1 hour - + one_day 1 day - + one_week 1 week - + disabled Disabled - + custom Custom: @@ -4092,110 +4092,110 @@ Error Zurück - + meetings_list_title Réunions Besprechungen - + meetings_search_hint "Rechercher une réunion" Besprechung suchen - + list_filter_no_result_found "Aucun résultat…" Kein Ergebnis… - + meetings_empty_list "Aucune réunion" Keine Besprechungen - - + + meeting_schedule_title "Nouvelle réunion" Neue Besprechung - + create Erstellen - - - - - - + + + + + + information_popup_error_title Fehler - - + + meeting_schedule_mandatory_field_not_filled_toast Veuillez saisir un titre et sélectionner au moins un participant Bitte Titel bestimmen und mindestens einen Teilnehmer auswählen - - + + meeting_schedule_duration_error_toast "La fin de la conférence doit être plus récente que son début" Das Ende der Besprechung muss nach dem Beginn liegen - - + + meeting_schedule_creation_in_progress "Création de la réunion en cours …" Besprechung wird erstellt… - + meeting_info_created_toast "Réunion planifiée avec succès" Besprechung erfolgreich erstellt - + meeting_failed_to_schedule_toast "Échec de création de la réunion !" Besprechung konnte nicht erstellt werden! - + save Speichern - - + + saved "Enregistré" Gespeichert - + meeting_info_updated_toast "Réunion mise à jour" Besprechung geändert - + meeting_schedule_edit_in_progress "Modification de la réunion en cours…" Bersprechung wird geändert… - + meeting_failed_to_edit_toast "Échec de la modification de la réunion !" Besprechung konnte nicht geändert werden! @@ -4225,19 +4225,19 @@ Error - + meeting_info_delete "Supprimer la réunion" Besprechung löschen - + meeting_address_copied_to_clipboard_toast "Adresse de la réunion copiée" Besprechungs-URI kopiert - + meeting_schedule_timezone_title "Fuseau horaire" Zeitzone @@ -4389,19 +4389,19 @@ Error NotificationReceivedCall - + call_audio_incoming "Appel entrant" Eingehender Anruf - + dialog_accept "Accepter" Akzeptieren - + dialog_deny "Refuser Ablehnen @@ -5238,49 +5238,49 @@ Pour les activer dans un projet commercial, merci de nous contacter. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 Die Anrufadresse ist keine interpretierbare SIP-Adresse: %1 - + group_call_error_no_account - + group_call_error_participants_invite - + group_call_error_creation - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss - + conference_invitation - + conference_invitation_updated - + conference_invitation_cancelled - + unknown_audio_device_name Unbekannter Gerätename diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index cb434a781..843493c04 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Connected - + drawer_menu_account_connection_status_refreshing Refreshing… - + drawer_menu_account_connection_status_progress Connecting… - + drawer_menu_account_connection_status_failed Error - + drawer_menu_account_connection_status_cleared Disabled - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." You are online and reachable. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Connection error, check your settings. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Account disabled, you will not receive calls or messages. @@ -847,25 +847,25 @@ CallHistoryLayout - + meeting_info_join_title "Rejoindre la réunion" Join meeting - + contact_call_action "Appel" Call - + contact_message_action "Message" Message - + contact_video_call_action "Appel Video" Video call @@ -1067,7 +1067,7 @@ - + menu_delete_history "Supprimer l'historique" Delete history @@ -1111,7 +1111,7 @@ - + information_popup_error_title Error @@ -1128,55 +1128,55 @@ You are not connected - + menu_see_existing_contact "Show contact" Show contact - + menu_add_address_to_contacts "Add to contacts" Add to contacts - + menu_copy_sip_address "Copier l'adresse SIP" Copy SIP address - + sip_address_copied_to_clipboard_toast Adresse copiée SIP address copied - + sip_address_copied_to_clipboard_message L'adresse a été copié dans le presse_papiers The address has been copied to the clipboard - + sip_address_copy_to_clipboard_error "Erreur lors de la copie de l'adresse" Error copying address - + notification_missed_call_title "Appel manqué" Missed call - + call_outgoing "Appel sortant" Outgoing call - + call_audio_incoming "Appel entrant" Incoming call @@ -1784,13 +1784,13 @@ ChatCore - + info_toast_deleted_title Deleted Deleted - + info_toast_deleted_message_history Message history has been deleted Message history has been deleted @@ -1814,65 +1814,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 is writing… - + chat_message_draft_sending_text Draft : %1 - + chat_room_delete "Delete" Delete - + chat_room_mute Mute - + chat_room_unmute "Mute" Unmute - + chat_room_mark_as_read "Mark as read" Mark as read - + chat_room_leave "leave" Leave - + chat_list_leave_chat_popup_title leave the conversation ? Leave the conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? - + chat_list_delete_chat_popup_title Delete the conversation ? Delete the conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? This conversation and all its messages will be deleted. Do You want to continue ? @@ -3157,42 +3157,42 @@ Only your correspondent can decrypt them. EphemeralSettings - + title Ephemeral messages - + explanations By enabling ephemeral messages in this chat, messages sent will be automatically deleted after the defined period. - + one_minute 1 minute - + one_hour 1 hour - + one_day 1 day - + one_week 1 week - + disabled Disabled - + custom Custom: @@ -4002,110 +4002,110 @@ Expiration : %1 Back - + meetings_list_title Réunions Meetings - + meetings_search_hint "Rechercher une réunion" Find meeting - + list_filter_no_result_found "Aucun résultat…" No result… - + meetings_empty_list "Aucune réunion" No meeting - - + + meeting_schedule_title "Nouvelle réunion" New meeting - + create Create - - - - - - + + + + + + information_popup_error_title Error - - + + meeting_schedule_mandatory_field_not_filled_toast Veuillez saisir un titre et sélectionner au moins un participant Please fill the title and select at least one participant - - + + meeting_schedule_duration_error_toast "La fin de la conférence doit être plus récente que son début" The end of the conference must be more recent than its beginning - - + + meeting_schedule_creation_in_progress "Création de la réunion en cours …" Creation in progress… - + meeting_info_created_toast "Réunion planifiée avec succès" Meeting successfully created - + meeting_failed_to_schedule_toast "Échec de création de la réunion !" Failed to create meeting! - + save Save - - + + saved "Enregistré" Saved - + meeting_info_updated_toast "Réunion mise à jour" Meeting updated - + meeting_schedule_edit_in_progress "Modification de la réunion en cours…" Meeting update in progress… - + meeting_failed_to_edit_toast "Échec de la modification de la réunion !" Failed to update meeting ! @@ -4131,19 +4131,19 @@ Expiration : %1 - + meeting_info_delete "Supprimer la réunion" Delete meeting - + meeting_address_copied_to_clipboard_toast "Adresse de la réunion copiée" Meeting URI copied - + meeting_schedule_timezone_title "Fuseau horaire" Timezone @@ -4290,19 +4290,19 @@ Expiration : %1 NotificationReceivedCall - + call_audio_incoming "Appel entrant" Incoming call - + dialog_accept "Accepter" Accept - + dialog_deny "Refuser Decline @@ -5127,49 +5127,49 @@ To enable them in a commercial project, please contact us. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 The calling address is not an interpretable SIP address : %1 - + group_call_error_no_account No default account found, can't create group call - + group_call_error_participants_invite Couldn't invite participants to group call - + group_call_error_creation Group call couldn't be created - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Voice recording (%1) - + unknown_audio_device_name Unknown device name - + conference_invitation Meeting invitation - + conference_invitation_cancelled Meeting cancellation - + conference_invitation_updated Meeting modification diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index f3fa19510..c51db0121 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Connecté - + drawer_menu_account_connection_status_refreshing En cours de rafraîchissement… - + drawer_menu_account_connection_status_progress Connexion… - + drawer_menu_account_connection_status_failed Erreur - + drawer_menu_account_connection_status_cleared Désactivé - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." Vous êtes en ligne et joignable. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Erreur de connexion, vérifiez vos paramètres. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Compte désactivé, vous ne recevrez ni appel ni message. @@ -847,25 +847,25 @@ CallHistoryLayout - + meeting_info_join_title "Rejoindre la réunion" Rejoindre la réunion - + contact_call_action "Appel" Appel - + contact_message_action "Message" Message - + contact_video_call_action "Appel Video" Appel Vidéo @@ -1057,7 +1057,7 @@ - + menu_delete_history "Supprimer l'historique" Supprimer l'historique @@ -1111,7 +1111,7 @@ - + information_popup_error_title Erreur @@ -1128,55 +1128,55 @@ Vous n'etes pas connecté - + menu_see_existing_contact "Show contact" Voir le contact - + menu_add_address_to_contacts "Add to contacts" Ajouter aux contacts - + menu_copy_sip_address "Copier l'adresse SIP" Copier l'adresse SIP - + sip_address_copied_to_clipboard_toast Adresse copiée Adresse copiée - + sip_address_copied_to_clipboard_message L'adresse a été copié dans le presse_papiers L'adresse a été copié dans le presse-papiers - + sip_address_copy_to_clipboard_error "Erreur lors de la copie de l'adresse" Erreur lors de la copie de l'adresse - + notification_missed_call_title "Appel manqué" Appel manqué - + call_outgoing "Appel sortant" Appel sortant - + call_audio_incoming "Appel entrant" Appel entrant @@ -1784,13 +1784,13 @@ ChatCore - + info_toast_deleted_title Deleted Supprimé - + info_toast_deleted_message_history Message history has been deleted L'historique des messages a été supprimé @@ -1814,65 +1814,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 est en train d'écrire… - + chat_message_draft_sending_text Brouillon : %1 - + chat_room_delete "Delete" Supprimer - + chat_room_mute Mettre en sourdine - + chat_room_unmute "Mute" Enlever la sourdine - + chat_room_mark_as_read "Mark as read" Marquer comme lu - + chat_room_leave "leave" Quitter la conversation - + chat_list_leave_chat_popup_title leave the conversation ? Quitter la conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? Vous ne pourrez plus envoyer ou recevoir de messages dans cette conversation. Souhaitez-vous continuer ? - + chat_list_delete_chat_popup_title Delete the conversation ? Supprimer la conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? La conversation et tous ses messages seront supprimés. Souhaitez-vous continuer ? @@ -3157,42 +3157,42 @@ en bout. Seul votre correspondant peut les déchiffrer. EphemeralSettings - + title Messages éphémères - + explanations En activant les messages éphémères dans cette discussion, les messages envoyés seront automatiquement détruits après le délai défini. - + one_minute 1 minute - + one_hour 1 heure - + one_day 1 jour - + one_week 1 semaine - + disabled Désactivé - + custom Personnalisé: @@ -4002,110 +4002,110 @@ Expiration : %1 Retour - + meetings_list_title Réunions Réunions - + meetings_search_hint "Rechercher une réunion" Rechercher une réunion - + list_filter_no_result_found "Aucun résultat…" Aucun résultat… - + meetings_empty_list "Aucune réunion" Aucune réunion - - + + meeting_schedule_title "Nouvelle réunion" Nouvelle réunion - + create Créer - - - - - - + + + + + + information_popup_error_title Erreur - - + + meeting_schedule_mandatory_field_not_filled_toast Veuillez saisir un titre et sélectionner au moins un participant Veuillez saisir un titre et sélectionner au moins un participant - - + + meeting_schedule_duration_error_toast "La fin de la conférence doit être plus récente que son début" La fin de la conférence doit être plus récente que son début - - + + meeting_schedule_creation_in_progress "Création de la réunion en cours …" Création de la réunion en cours… - + meeting_info_created_toast "Réunion planifiée avec succès" Réunion planifiée avec succès - + meeting_failed_to_schedule_toast "Échec de création de la réunion !" Échec de création de la réunion ! - + save Enregistrer - - + + saved "Enregistré" Enregistré - + meeting_info_updated_toast "Réunion mise à jour" Réunion mise à jour - + meeting_schedule_edit_in_progress "Modification de la réunion en cours…" Modification de la réunion en cours… - + meeting_failed_to_edit_toast "Échec de la modification de la réunion !" Échec de la modification de la réunion ! @@ -4131,19 +4131,19 @@ Expiration : %1 - + meeting_info_delete "Supprimer la réunion" Supprimer la réunion - + meeting_address_copied_to_clipboard_toast "Adresse de la réunion copiée" Adresse de la réunion copiée - + meeting_schedule_timezone_title "Fuseau horaire" Fuseau horaire @@ -4290,19 +4290,19 @@ Expiration : %1 NotificationReceivedCall - + call_audio_incoming "Appel entrant" Appel entrant - + dialog_accept "Accepter" Accepter - + dialog_deny "Refuser Refuser @@ -5127,49 +5127,49 @@ Pour les activer dans un projet commercial, merci de nous contacter. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 L'adresse n'est pas interprétable comme une adresse SIP - + group_call_error_no_account Impossible de créer l'appel de groupe, le compte par défaut n'est pas défini - + group_call_error_participants_invite Impossible d'inviter les participants à l'appel de groupe - + group_call_error_creation L'appel de groupe n'a pas pu être créé - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Message vocal (%1) - + unknown_audio_device_name Appareil inconnu - + conference_invitation Invitation à une réunion - + conference_invitation_cancelled Annulation d'une réunion - + conference_invitation_updated Modification d'une réunion diff --git a/Linphone/model/conference/ConferenceInfoModel.cpp b/Linphone/model/conference/ConferenceInfoModel.cpp index 5f33e33d8..956e6b874 100644 --- a/Linphone/model/conference/ConferenceInfoModel.cpp +++ b/Linphone/model/conference/ConferenceInfoModel.cpp @@ -68,10 +68,13 @@ void ConferenceInfoModel::setConferenceScheduler(const std::shared_ptrenableChat(true); params->enableGroup(false); params->setAccount(mConferenceSchedulerModel->getMonitor()->getAccount()); - // set to basic cause FlexisipChat force to set a subject - params->getChatParams()->setBackend(linphone::ChatRoom::Backend::Basic); - // Lime si chiffré, si non None - params->getChatParams()->setEncryptionBackend(linphone::ChatRoom::EncryptionBackend::None); + params->setSubject("Meeting invitation"); // won't be used but necessary to send in a + // secured chatroom + auto chatParams = params->getChatParams(); + if (!chatParams) return; + chatParams->setEphemeralLifetime(0); + chatParams->setBackend(linphone::ChatRoom::Backend::FlexisipChat); + params->setSecurityLevel(linphone::Conference::SecurityLevel::EndToEnd); mConferenceSchedulerModel->getMonitor()->sendInvitations(params); } emit schedulerStateChanged(state); diff --git a/Linphone/model/tool/ToolModel.cpp b/Linphone/model/tool/ToolModel.cpp index 80080d479..629f8d988 100644 --- a/Linphone/model/tool/ToolModel.cpp +++ b/Linphone/model/tool/ToolModel.cpp @@ -91,8 +91,21 @@ QString ToolModel::getDisplayName(const std::shared_ptr if (displayName.isEmpty()) { displayName = Utils::coreStringToAppString(address->getDisplayName()); if (displayName.isEmpty()) { - displayName = Utils::coreStringToAppString(address->getUsername()); - displayName.replace('.', ' '); + auto accounts = CoreModel::getInstance()->getCore()->getAccountList(); + auto found = std::find_if(accounts.begin(), accounts.end(), + [address](std::shared_ptr account) { + return address->weakEqual(account->getParams()->getIdentityAddress()); + }); + if (found != accounts.end()) { + displayName = + Utils::coreStringToAppString(found->get()->getParams()->getIdentityAddress()->getDisplayName()); + } + if (displayName.isEmpty()) { + displayName = Utils::coreStringToAppString(address->getUsername()); + if (displayName.isEmpty()) { + return Utils::coreStringToAppString(address->asStringUriOnly()); + } + } } } // TODO diff --git a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml index 71645715d..8c04c7d2d 100644 --- a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml +++ b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml @@ -74,7 +74,6 @@ ColumnLayout { font { pixelSize: Typography.p1.pixelSize weight: Typography.p1.weight - capitalization: Font.Capitalize } } Text { diff --git a/Linphone/view/Control/Display/Call/CallHistoryListView.qml b/Linphone/view/Control/Display/Call/CallHistoryListView.qml index e886ee8d6..0fb216edc 100644 --- a/Linphone/view/Control/Display/Call/CallHistoryListView.qml +++ b/Linphone/view/Control/Display/Call/CallHistoryListView.qml @@ -145,14 +145,12 @@ ListView { Layout.fillWidth: true spacing: Math.round(5 * DefaultStyle.dp) Text { - id: friendAddress Layout.fillWidth: true maximumLineCount: 1 text: modelData.core.displayName font { pixelSize: Typography.p1.pixelSize weight: Typography.p1.weight - capitalization: Font.Capitalize } } RowLayout { diff --git a/Linphone/view/Control/Display/Chat/ChatListView.qml b/Linphone/view/Control/Display/Chat/ChatListView.qml index 8b0bd4070..1f788a378 100644 --- a/Linphone/view/Control/Display/Chat/ChatListView.qml +++ b/Linphone/view/Control/Display/Chat/ChatListView.qml @@ -28,6 +28,9 @@ ListView { } onChatClicked: (chat) => {selectChat(chat)} + onCountChanged: { + selectChat(currentChatGui) + } signal markAllAsRead() signal chatClicked(ChatGui chat) @@ -38,10 +41,7 @@ ListView { loading = true } filterText: mainItem.searchText - onFilterTextChanged: maxDisplayItems = initialDisplayItems - initialDisplayItems: Math.max( - 20, - 2 * mainItem.height / (Math.round(56 * DefaultStyle.dp))) + initialDisplayItems: Math.max(20, 2 * mainItem.height / (Math.round(56 * DefaultStyle.dp))) displayItemsStep: 3 * initialDisplayItems / 2 onModelReset: { loading = false @@ -205,7 +205,6 @@ ListView { font { pixelSize: Typography.p1.pixelSize weight: unreadCount.unread > 0 ? Typography.p2.weight : Typography.p1.weight - capitalization: Font.Capitalize } } diff --git a/Linphone/view/Control/Display/Chat/ChatMessagesListView.qml b/Linphone/view/Control/Display/Chat/ChatMessagesListView.qml index 2ce6c1a2b..f953a95fe 100644 --- a/Linphone/view/Control/Display/Chat/ChatMessagesListView.qml +++ b/Linphone/view/Control/Display/Chat/ChatMessagesListView.qml @@ -242,7 +242,7 @@ ListView { Component.onCompleted: { if (index === 0) mainItem.lastItemVisible = isFullyVisible } - onYChanged: if (index === 0) mainItem.lastItemVisible = isFullyVisible + // onYChanged: if (index === 0) mainItem.lastItemVisible = isFullyVisible chat: mainItem.chat searchedTextPart: mainItem.filterText maxWidth: Math.round(mainItem.width * (3/4)) diff --git a/Linphone/view/Page/Layout/Chat/EphemeralSettings.qml b/Linphone/view/Page/Layout/Chat/EphemeralSettings.qml index 4e5df2f2d..8eb5fb9f0 100644 --- a/Linphone/view/Page/Layout/Chat/EphemeralSettings.qml +++ b/Linphone/view/Page/Layout/Chat/EphemeralSettings.qml @@ -13,8 +13,7 @@ ColumnLayout { id: mainItem property ChatGui chatGui - property var chatCore: chatGui.core - property int selectedLifetime: chatCore.ephemeralLifetime + property int selectedLifetime: chatGui.core.ephemeralLifetime spacing: Math.round(5 * DefaultStyle.dp) signal done() @@ -48,8 +47,8 @@ ColumnLayout { style: ButtonStyle.noBackground icon.source: AppIcons.leftArrow onClicked: { - if (chatCore.ephemeralLifetime != selectedLifetime) - chatCore.ephemeralLifetime = selectedLifetime + if (chatGui.core.ephemeralLifetime != selectedLifetime) + chatGui.core.ephemeralLifetime = selectedLifetime mainItem.done() } } diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index abf94d01a..b5e9b8808 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -430,8 +430,6 @@ AbstractMainPage { Component { id: contactDetailComp FocusScope { - // width: parent?.width - // height: parent?.height CallHistoryLayout { id: contactDetail anchors.fill: parent @@ -552,10 +550,9 @@ AbstractMainPage { Layout.fillHeight: true RoundedPane { id: detailControl + visible: detailListView.count > 0 width: parent.width - height: Math.min( - parent.height, - detailListView.contentHeight) + topPadding + bottomPadding + height: Math.min(parent.height, detailListView.contentHeight) + topPadding + bottomPadding background: Rectangle { id: detailListBackground anchors.fill: parent @@ -563,79 +560,90 @@ AbstractMainPage { radius: Math.round(15 * DefaultStyle.dp) } - contentItem: CallHistoryListView { - id: detailListView - Layout.fillWidth: true - Layout.fillHeight: true - spacing: Math.round(14 * DefaultStyle.dp) - clip: true - searchText: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.remoteAddress : "" - busyIndicatorSize: Math.round(40 * DefaultStyle.dp) + contentItem: Control.ScrollView { + id: historyScrollView + Control.ScrollBar.vertical: ScrollBar { + id: historyScrollBar + visible: historyScrollView.contentHeight > historyScrollView.height + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: parent.right + } + CallHistoryListView { + id: detailListView + Layout.fillWidth: true + Layout.fillHeight: true + Layout.rightMargin: historyScrollBar.width + Math.round(8 * DefaultStyle.dp) + spacing: Math.round(14 * DefaultStyle.dp) + clip: true + searchText: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.remoteAddress : "" + busyIndicatorSize: Math.round(40 * DefaultStyle.dp) - delegate: Item { - width: detailListView.width - height: Math.round(56 * DefaultStyle.dp) - RowLayout { - anchors.fill: parent - anchors.leftMargin: Math.round(20 * DefaultStyle.dp) - anchors.rightMargin: Math.round(20 * DefaultStyle.dp) - anchors.verticalCenter: parent.verticalCenter - ColumnLayout { - Layout.alignment: Qt.AlignVCenter - RowLayout { - EffectImage { - id: statusIcon - imageSource: modelData.core.status - === LinphoneEnums.CallStatus.Declined - || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft - colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted || modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500main - Layout.preferredWidth: Math.round(16 * DefaultStyle.dp) - Layout.preferredHeight: Math.round(16 * DefaultStyle.dp) - transform: Rotation { - angle: modelData.core.isOutgoing - && (modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0 - origin { - x: statusIcon.width / 2 - y: statusIcon.height / 2 + delegate: Item { + width: detailListView.width + height: Math.round(56 * DefaultStyle.dp) + RowLayout { + anchors.fill: parent + anchors.leftMargin: Math.round(20 * DefaultStyle.dp) + anchors.rightMargin: Math.round(20 * DefaultStyle.dp) + anchors.verticalCenter: parent.verticalCenter + ColumnLayout { + Layout.alignment: Qt.AlignVCenter + RowLayout { + EffectImage { + id: statusIcon + imageSource: modelData.core.status + === LinphoneEnums.CallStatus.Declined + || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft + colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted || modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500main + Layout.preferredWidth: Math.round(16 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(16 * DefaultStyle.dp) + transform: Rotation { + angle: modelData.core.isOutgoing + && (modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0 + origin { + x: statusIcon.width / 2 + y: statusIcon.height / 2 + } + } + } + Text { + //: "Appel manqué" + text: modelData.core.status === LinphoneEnums.CallStatus.Missed ? qsTr("notification_missed_call_title") + : modelData.core.isOutgoing + //: "Appel sortant" + ? qsTr("call_outgoing") + //: "Appel entrant" + : qsTr("call_audio_incoming") + font { + pixelSize: Typography.p1.pixelSize + weight: Typography.p1.weight } } } Text { - //: "Appel manqué" - text: modelData.core.status === LinphoneEnums.CallStatus.Missed ? qsTr("notification_missed_call_title") - : modelData.core.isOutgoing - //: "Appel sortant" - ? qsTr("call_outgoing") - //: "Appel entrant" - : qsTr("call_audio_incoming") + text: UtilsCpp.formatDate(modelData.core.date) + color: modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : DefaultStyle.main2_500main font { - pixelSize: Typography.p1.pixelSize - weight: Typography.p1.weight + pixelSize: Math.round(12 * DefaultStyle.dp) + weight: Math.round(300 * DefaultStyle.dp) } } } + Item { + Layout.fillHeight: true + Layout.fillWidth: true + } Text { - text: UtilsCpp.formatDate(modelData.core.date) - color: modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : DefaultStyle.main2_500main + text: UtilsCpp.formatElapsedTime( + modelData.core.duration, + false) font { pixelSize: Math.round(12 * DefaultStyle.dp) weight: Math.round(300 * DefaultStyle.dp) } } } - Item { - Layout.fillHeight: true - Layout.fillWidth: true - } - Text { - text: UtilsCpp.formatElapsedTime( - modelData.core.duration, - false) - font { - pixelSize: Math.round(12 * DefaultStyle.dp) - weight: Math.round(300 * DefaultStyle.dp) - } - } } } } diff --git a/Linphone/view/Page/Main/Meeting/MeetingPage.qml b/Linphone/view/Page/Main/Meeting/MeetingPage.qml index 4cea3d4dd..c9235e0dc 100644 --- a/Linphone/view/Page/Main/Meeting/MeetingPage.qml +++ b/Linphone/view/Page/Main/Meeting/MeetingPage.qml @@ -132,7 +132,6 @@ AbstractMainPage { anchors.bottomMargin: Math.round(30 * DefaultStyle.dp) height: parent.height - anchors.topMargin anchors.horizontalCenter: parent.horizontalCenter - contentHeight: overridenRightPanelStackView.currentItem ? overridenRightPanelStackView.currentItem.childrenRect.height : 0 contentWidth: width clip: true Control.ScrollBar.vertical: ScrollBar { @@ -141,7 +140,7 @@ AbstractMainPage { anchors.bottom: parent.bottom anchors.right: parent.right } - contentChildren: ColumnLayout { + ColumnLayout { anchors.fill: parent anchors.rightMargin: Math.round(10 * DefaultStyle.dp) width: Math.round(393 * DefaultStyle.dp) @@ -149,7 +148,7 @@ AbstractMainPage { id: overridenRightPanelStackView Layout.fillWidth: true Layout.fillHeight: true - height: currentItem ? currentItem.height : 0 + Layout.preferredHeight: currentItem ? currentItem.childrenRect.height : 0 } } } @@ -551,6 +550,7 @@ AbstractMainPage { ColumnLayout { id: addParticipantsLayout spacing: Math.round(18 * DefaultStyle.dp) + anchors.rightMargin: Math.round(8 * DefaultStyle.dp) anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top @@ -626,13 +626,15 @@ AbstractMainPage { id: meetingDetail FocusScope{ width: overridenRightPanelStackView.width + height: meetingDetailsLayout.childrenRect.height ColumnLayout { id: meetingDetailsLayout anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top + // anchors.fill: parent visible: mainItem.selectedConference - spacing: Math.round(25 * DefaultStyle.dp) + spacing: Math.round(16 * DefaultStyle.dp) Section { visible: mainItem.selectedConference Layout.fillWidth: true @@ -752,7 +754,6 @@ AbstractMainPage { KeyNavigation.right: linkButton KeyNavigation.up: deletePopup KeyNavigation.down: joinButton - Layout.preferredWidth: Math.round(24 * DefaultStyle.dp) onClicked: { var success = UtilsCpp.copyToClipboard(mainItem.selectedConference.core.uri) if (success) UtilsCpp.showInformationPopup(qsTr("saved"), @@ -848,9 +849,8 @@ AbstractMainPage { } Section { visible: participantList.count > 0 - Layout.fillWidth: true content: RowLayout { - Layout.preferredHeight: participantList.height + Layout.preferredHeight: participantList.contentHeight width: Math.round(393 * DefaultStyle.dp) spacing: Math.round(8 * DefaultStyle.dp) EffectImage { @@ -863,7 +863,7 @@ AbstractMainPage { } ListView { id: participantList - Layout.preferredHeight: Math.min(Math.round(184 * DefaultStyle.dp), contentHeight) + Layout.preferredHeight: contentHeight Layout.fillWidth: true model: mainItem.selectedConference && mainItem.selectedConference.core ? mainItem.selectedConference.core.participants : [] clip: true @@ -928,7 +928,6 @@ AbstractMainPage { UtilsCpp.smartShowWindow(callsWindow) } } - Item { Layout.fillHeight: true} } } }