From 7fbc0c80d12cb6dee7f3c854a068512736187d48 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Mon, 9 Mar 2026 14:58:09 +0100 Subject: [PATCH] Change location of chat history #LINQT-2449 --- .../core/call-history/CallHistoryCore.cpp | 7 +- .../core/call-history/CallHistoryCore.hpp | 8 +- Linphone/data/languages/de.ts | 612 +++++++++-------- Linphone/data/languages/en.ts | 614 +++++++++--------- Linphone/data/languages/fr.ts | 614 +++++++++--------- .../model/call-history/CallHistoryModel.cpp | 4 + .../model/call-history/CallHistoryModel.hpp | 1 + Linphone/tool/Utils.cpp | 18 + Linphone/tool/Utils.hpp | 3 +- .../Container/Call/CallHistoryLayout.qml | 12 +- Linphone/view/Control/Display/Text.qml | 1 - .../view/Page/Form/Chat/SelectedChatView.qml | 10 +- Linphone/view/Page/Main/Call/CallPage.qml | 117 ++-- 13 files changed, 1019 insertions(+), 1002 deletions(-) diff --git a/Linphone/core/call-history/CallHistoryCore.cpp b/Linphone/core/call-history/CallHistoryCore.cpp index 75a486304..c4186282f 100644 --- a/Linphone/core/call-history/CallHistoryCore.cpp +++ b/Linphone/core/call-history/CallHistoryCore.cpp @@ -54,13 +54,14 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr &callL mDuration = QString::number(callLog->getDuration()); mIsConference = callLog->wasConference(); mCallId = Utils::coreStringToAppString(callLog->getCallId()); + mHasChat = false; if (mIsConference) { auto confinfo = callLog->getConferenceInfo(); mConferenceInfo = ConferenceInfoCore::create(confinfo); mRemoteAddress = Utils::coreStringToAppString(confinfo->getUri()->asStringUriOnly()); mDisplayName = Utils::coreStringToAppString(confinfo->getSubject()); if (auto chatroom = callLog->getChatRoom()) { - mChatCore = ChatCore::create(chatroom); + mHasChat = true; } } else { mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly()); @@ -160,8 +161,8 @@ void CallHistoryCore::setDuration(const QString &duration) { } } -ChatGui *CallHistoryCore::getChatGui() const { - return mChatCore ? new ChatGui(mChatCore) : nullptr; +std::shared_ptr CallHistoryCore::getModel() const { + return mCallHistoryModel; } void CallHistoryCore::remove() { diff --git a/Linphone/core/call-history/CallHistoryCore.hpp b/Linphone/core/call-history/CallHistoryCore.hpp index 192069fe5..ca59fdc0b 100644 --- a/Linphone/core/call-history/CallHistoryCore.hpp +++ b/Linphone/core/call-history/CallHistoryCore.hpp @@ -30,8 +30,6 @@ #include class CallHistoryModel; -class ChatCore; -class ChatGui; class FriendModel; class CallHistoryCore : public QObject, public AbstractObject { @@ -41,8 +39,8 @@ class CallHistoryCore : public QObject, public AbstractObject { Q_PROPERTY(QString remoteAddress MEMBER mRemoteAddress CONSTANT) Q_PROPERTY(bool isOutgoing MEMBER mIsOutgoing CONSTANT) Q_PROPERTY(bool isConference MEMBER mIsConference CONSTANT) + Q_PROPERTY(bool hasChat MEMBER mHasChat CONSTANT) Q_PROPERTY(ConferenceInfoGui *conferenceInfo READ getConferenceInfoGui CONSTANT) - Q_PROPERTY(ChatGui *chatGui READ getChatGui CONSTANT) Q_PROPERTY(QDateTime date MEMBER mDate CONSTANT) Q_PROPERTY(LinphoneEnums::CallStatus status MEMBER mStatus CONSTANT) Q_PROPERTY(QString duration READ getDuration WRITE setDuration NOTIFY durationChanged) @@ -58,7 +56,7 @@ public: QString getDuration() const; void setDuration(const QString &duration); - ChatGui *getChatGui() const; + std::shared_ptr getModel() const; void onRemoved(const std::shared_ptr &updatedFriend); @@ -81,7 +79,7 @@ signals: private: QString mDuration; QSharedPointer mConferenceInfo = nullptr; - QSharedPointer mChatCore = nullptr; + bool mHasChat = false; std::shared_ptr mCallHistoryModel; std::shared_ptr mFriendModel; QSharedPointer> mFriendModelConnection; diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index b285614ac..f8893b2be 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -714,6 +714,7 @@ info_popup_new_version_download_label + Download it ! @@ -731,6 +732,7 @@ info_popup_version_up_to_date_title + Up to date @@ -990,8 +992,8 @@ CallHistoryLayout - - + + meeting_info_join_title "Rejoindre la réunion" ---------- @@ -999,31 +1001,25 @@ Besprechung beitreten - - contact_call_history_action - "Call history" - - - - + contact_conversation_action "Conversation" - + contact_call_action "Appel" Anrufen - + contact_message_action "Message" Nachricht - + contact_video_call_action "Appel Video" Videoanruf @@ -1117,6 +1113,7 @@ local_group_call + "Local group call" @@ -1445,19 +1442,19 @@ 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 @@ -2380,6 +2377,7 @@ Error popup_error_nb_files_not_found_message + %n files were not found @@ -2400,6 +2398,7 @@ Error popup_error_unsupported_files_message + Unable to get supported mime type for %1 files. @@ -2805,34 +2804,28 @@ Error CliModel - show_function_description - Zeigen + Zeigen - fetch_config_function_description - Konfiguration abrufen + Konfiguration abrufen - call_function_description - Anrufen + Anrufen - bye_function_description - Auflegen + Auflegen - accept_function_description - Akzeptieren + Akzeptieren - decline_function_description - Ablehnen + Ablehnen @@ -4488,6 +4481,7 @@ Error default_account_connection_state_error_toast + Erreur durant la connexion, veuillez vérifier vos paramètres Fehler bei der Verbindung @@ -6088,41 +6082,41 @@ Pour les activer dans un projet commercial, merci de nous contacter. SelectedChatView - + chat_view_group_call_toast_message Start a group call ? - + reply_to_label Reply to %1 - + conversation_editing_message_title - + shared_medias_title Shared medias - + shared_documents_title Shared documents - + forward_to_title Forward to… - + conversations_title Conversations Konversationen @@ -6322,13 +6316,14 @@ Pour les activer dans un projet commercial, merci de nous contacter. unknown_audio_device_name + "Unknown device" Unbekannter Gerätename Utils - + nMinute @@ -6336,7 +6331,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nHour @@ -6344,8 +6339,8 @@ Pour les activer dans un projet commercial, merci de nous contacter. - - + + nDay @@ -6353,7 +6348,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nWeek @@ -6361,7 +6356,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nSeconds @@ -6369,26 +6364,26 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + information_popup_call_not_created_message "L'appel n'a pas pu être créé" Anruf konnte nicht erstellt werden - - - + + + information_popup_error_title Failed to create 1-1 conversation with %1 ! Fehler - + information_popup_group_call_not_created_message - + number_of_years %n an(s) @@ -6397,7 +6392,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_month "%n mois" @@ -6406,7 +6401,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_weeks %n semaine(s) @@ -6415,7 +6410,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_days %n jour(s) @@ -6424,25 +6419,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + today "Aujourd'hui" Heute - + yesterday "Hier Gestern - + duration_tomorrow Tomorrow - + duration_number_of_days %1 jour(s) @@ -6451,130 +6446,133 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + call_zrtp_token_verification_possible_characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - + information_popup_chatroom_creation_error_message - + contact_presence_status_available Verfügbar - + contact_presence_status_away Abwesend - + contact_presence_status_busy Beschäftigt - + contact_presence_status_do_not_disturb Nicht stören - + contact_presence_status_offline Offline - + chat_message_edit_error Cannot edit to invalid message - + info_popup_edited_message_error Could not send edited message : %1 - + info_popup_send_edited_message_error_message Failed to create edited message - + recorder_error Error with the recorder - - - - + + + + chat_error + Error creating or opening the chat +---------- +Error in the chat - + chat_message_forward_error Cannot forward an invalid message - - - - - - - - + + + + + + + + info_popup_error_title Error Fehler - + info_popup_forward_message_error Could not forward message : %1 - + info_popup_send_forward_message_error_message Failed to create forward message - + chat_message_reply_error Cannot reply to invalid message - + info_popup_reply_message_error Could not send reply message : %1 - + info_popup_send_reply_message_error_message Failed to create reply message - + info_popup_send_voice_message_error_message Could not send voice message : %1 - + info_popup_send_voice_message_sending_error_message Failed to create message from record @@ -6743,1117 +6741,1117 @@ Pour les activer dans un projet commercial, merci de nous contacter. country - + Afghanistan Afghanistan - + Albania Albanien - + Algeria Algerien - + AmericanSamoa Amerikanisch-Samoa - + Andorra Andorra - + Angola Angola - + Anguilla Anguilla - + AntiguaAndBarbuda Antigua und Barbuda - + Argentina Argentinien - + Armenia Armenien - + Aruba Aruba - + Australia Australien - + Austria Österreich - + Azerbaijan Aserbaidschan - + Bahamas Bahamas - + Bahrain Bahrain - + Bangladesh Bangladesch - + Barbados Barbados - + Belarus Belarus - + Belgium Belgien - + Belize Belize - + Benin Benin - + Bermuda Bermuda - + Bhutan Bhutan - + Bolivia Bolivien - + BosniaAndHerzegowina Bosnien und Herzegowina - + Botswana Botswana - + Brazil Brasilien - + Brunei Brunei - + Bulgaria Bulgarien - + BurkinaFaso Burkina Faso - + Burundi Burundi - + Cambodia Kambodscha - + Cameroon Kamerun - + Canada Kanada - + CapeVerde Kap Verde - + CaymanIslands Caymaninseln - + CentralAfricanRepublic Zentralafrikanische Republik - + Chad Tschad - + Chile Chile - + China China - + Colombia Kolumbien - + Comoros Komoren - + PeoplesRepublicOfCongo Volksrepublik Kongo - + CookIslands Cookinseln - + CostaRica Kosta Rica - + IvoryCoast Elfenbeinküste - + Croatia Kroatien - + Cuba Kuba - + Cyprus Zypern - + CzechRepublic Tschechische Republik - + Denmark Dänemark - + Djibouti Dschibuti - + Dominica Dominica - + DominicanRepublic Dominikanische Republik - + Ecuador Ecuador - + Egypt Ägypten - + ElSalvador El Salvador - + EquatorialGuinea Äquatorialguinea - + Eritrea Eritrea - + Estonia Estland - + Ethiopia Äthiopien - + FalklandIslands Falklandinseln - + FaroeIslands Färöer-Inseln - + Fiji Fidschi - + Finland Finnland - + France Frankreich - + FrenchGuiana Französisch-Guayana - + FrenchPolynesia Französisch-Polynesien - + Gabon Gabon - + Gambia Gambia - + Georgia Georgien - + Germany Deutschland - + Ghana Ghana - + Gibraltar Gibraltar - + Greece Griechenland - + Greenland Grönland - + Grenada Grenada - + Guadeloupe Guadeloupe - + Guam Guam - + Guatemala Guatemala - + Guinea Guinea - + GuineaBissau Guinea-Bissau - + Guyana Guyana - + Haiti Haiti - + Honduras Honduras - + DemocraticRepublicOfCongo Demokratische Republik Kongo - + HongKong Hongkong - + Hungary Ungarn - + Iceland Island - + India Indien - + Indonesia Indonesien - + Iran Iran - + Iraq Irak - + Ireland Irland - + Israel Israel - + Italy Italien - + Jamaica Jamaika - + Japan Japan - + Jordan Jordanien - + Kazakhstan Kasachstan - + Kenya Kenia - + Kiribati Kiribati - + DemocraticRepublicOfKorea Demokratische Volksrepublik Korea - + RepublicOfKorea Republik Korea - + Kuwait Kuwait - + Kyrgyzstan Kirgisistan - + Laos Laos - + Latvia Lettland - + Lebanon Libanon - + Lesotho Lesotho - + Liberia Liberien - + Libya Libyen - + Liechtenstein Liechtenstein - + Lithuania Litauen - + Luxembourg Luxemburg - + Macau Macau - + Macedonia Mazedonien - + Madagascar Madagaskar - + Malawi Malawi - + Malaysia Malaysien - + Maldives Malediven - + Mali Mali - + Malta Malta - + MarshallIslands Marshallinseln - + Martinique Martinique - + Mauritania Mauretanien - + Mauritius Mauritius - + Mayotte Mayotte - + Mexico Mexiko - + Micronesia Föderierte Staaten von Mikronesien - + Moldova Moldawien - + Monaco Monaco - + Mongolia Mongolei - + Montenegro Montenegro - + Montserrat Montserrat - + Morocco Marokko - + Mozambique Mosambik - + Myanmar Myanmar - + Namibia Namibia - + NauruCountry Nauru - + Nepal Nepal - + Netherlands Niederlande - + NewCaledonia Neukaledonien - + NewZealand Neuseeland - + Nicaragua Nicaragua - + Niger Niger - + Nigeria Nigeria - + Niue Niue - + NorfolkIsland Norfolkinsel - + NorthernMarianaIslands Nördliche Marianeninseln - + Norway Norwegen - + Oman Oman - + Pakistan Pakistan - + Palau Palau - + PalestinianTerritories Palästinensische Gebiete - + Panama Panama - + PapuaNewGuinea Papua-Neuguinea - + Paraguay Paraguay - + Peru Peru - + Philippines Philippinen - + Poland Polen - + Portugal Portugal - + PuertoRico Puerto Rico - + Qatar Katar - + Reunion Réunion - + Romania Rumänien - + RussianFederation Russische Föderation - + Rwanda Ruanda - + SaintHelena Sankt Helena - + SaintKittsAndNevis Sankt Kitts und Nevis - + SaintLucia Sankt Lucia - + SaintPierreAndMiquelon Sankt Pierre und Miquelon - + SaintVincentAndTheGrenadines Sankt Vincent und die Grenadinen - + Samoa Samoa - + SanMarino San Marino - + SaoTomeAndPrincipe São Tomé und Príncipe - + SaudiArabia Saudi-Arabien - + Senegal Senegal - + Serbia Serbien - + Seychelles Seychellen - + SierraLeone Sierra Leone - + Singapore Singapur - + Slovakia Slowakei - + Slovenia Slowenien - + SolomonIslands Salomonen - + Somalia Somalia - + SouthAfrica Südafrika - + Spain Spanien - + SriLanka Sri Lanka - + Sudan Sudan - + Suriname Suriname - + Swaziland Eswatini - + Sweden Schweden - + Switzerland Schweiz - + Syria Syrien - + Taiwan Taiwan - + Tajikistan Tadschikistan - + Tanzania Tansania - + Thailand Thailand - + Togo Togo - + Tokelau Tokelau - + Tonga Tonga - + TrinidadAndTobago Trinidad und Tobago - + Tunisia Tunesien - + Turkey Türkei - + Turkmenistan Turkmenistan - + TurksAndCaicosIslands Turks- und Caicosinseln - + Tuvalu Tuvalu - + Uganda Uganda - + Ukraine Ukraine - + UnitedArabEmirates Vereinigte Arabische Emirate - + UnitedKingdom Vereinigtes Königreich - + UnitedStates Vereinigte Staaten - + Uruguay Uruguay - + Uzbekistan Usbekistan - + Vanuatu Vanuatu - + Venezuela Venezuela - + Vietnam Vietnam - + WallisAndFutunaIslands Wallis und Futuna Inseln - + Yemen Jemen - + Zambia Sambia - + Zimbabwe Simbabwe diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 18a020089..adb2c50c0 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -705,6 +705,7 @@ info_popup_new_version_download_label + Download it ! Download it ! @@ -722,6 +723,7 @@ info_popup_version_up_to_date_title + Up to date Up to date @@ -1001,8 +1003,8 @@ CallHistoryLayout - - + + meeting_info_join_title "Rejoindre la réunion" ---------- @@ -1010,31 +1012,25 @@ Join meeting - - contact_call_history_action - "Call history" - - - - + contact_conversation_action "Conversation" - + Conversation - + contact_call_action "Appel" Call - + contact_message_action "Message" Message - + contact_video_call_action "Appel Video" Video call @@ -1128,6 +1124,7 @@ local_group_call + "Local group call" Local group call @@ -1438,19 +1435,19 @@ Error copying address - + notification_missed_call_title "Appel manqué" Missed call - + call_outgoing "Appel sortant" Outgoing call - + call_audio_incoming "Appel entrant" Incoming call @@ -2373,6 +2370,7 @@ Error popup_error_nb_files_not_found_message + %n files were not found %1 files were not found @@ -2393,6 +2391,7 @@ Error popup_error_unsupported_files_message + Unable to get supported mime type for %1 files. Unable to get supported mime type for %1 files. @@ -2790,34 +2789,28 @@ Only your correspondent can decrypt them. CliModel - show_function_description - Show + Show - fetch_config_function_description - Fetch configuration + Fetch configuration - call_function_description - Call + Call - bye_function_description - Hang up + Hang up - accept_function_description - Accept + Accept - decline_function_description - Decline + Decline @@ -4420,6 +4413,7 @@ Expiration : %1 default_account_connection_state_error_toast + Erreur durant la connexion, veuillez vérifier vos paramètres Error during connection @@ -5999,7 +5993,7 @@ To enable them in a commercial project, please contact us. SelectedChatView - + chat_view_group_call_toast_message Start a group call ? @@ -6009,36 +6003,36 @@ To enable them in a commercial project, please contact us. This conversation is not encrypted ! - + reply_to_label Reply to %1 Reply to %1 - + conversation_editing_message_title Message beeing edited - + shared_medias_title Shared medias Shared medias - + shared_documents_title Shared documents Shared documents - + forward_to_title Forward to… Forward to… - + conversations_title Conversations Conversations @@ -6201,6 +6195,7 @@ To enable them in a commercial project, please contact us. unknown_audio_device_name + "Unknown device" Unknown device name @@ -6232,7 +6227,7 @@ To enable them in a commercial project, please contact us. Utils - + nSeconds %1 second @@ -6240,7 +6235,7 @@ To enable them in a commercial project, please contact us. - + nMinute %1 minute @@ -6248,61 +6243,61 @@ To enable them in a commercial project, please contact us. - + chat_message_forward_error Cannot forward an invalid message Cannot forward an invalid message - + info_popup_forward_message_error Could not forward message : %1 Could not forward message : %1 - + info_popup_send_forward_message_error_message Failed to create forward message Failed to create forward message - + chat_message_reply_error Cannot reply to invalid message Cannot reply to invalid message - + chat_message_edit_error Cannot edit to invalid message Cannot modify invalid message - + info_popup_reply_message_error Could not send reply message : %1 Could not send reply message : %1 - + info_popup_edited_message_error Could not send edited message : %1 Could not send edited message : %1 - + info_popup_send_reply_message_error_message Failed to create reply message Failed to create reply message - + info_popup_send_edited_message_error_message Failed to create edited message Failed to create edited message - + nHour %1 hour @@ -6310,8 +6305,8 @@ To enable them in a commercial project, please contact us. - - + + nDay %1 day @@ -6319,7 +6314,7 @@ To enable them in a commercial project, please contact us. - + nWeek %1 week @@ -6327,51 +6322,51 @@ To enable them in a commercial project, please contact us. - + contact_presence_status_available Available - + contact_presence_status_busy Busy - + contact_presence_status_do_not_disturb Do not disturb - + contact_presence_status_offline Offline - + contact_presence_status_away Idle/Away - + information_popup_call_not_created_message "L'appel n'a pas pu être créé" Call could not be created - - - + + + information_popup_error_title Failed to create 1-1 conversation with %1 ! Error - + information_popup_group_call_not_created_message Group call couldn't be created - + number_of_years %n an(s) @@ -6380,7 +6375,7 @@ To enable them in a commercial project, please contact us. - + number_of_month "%n mois" @@ -6389,7 +6384,7 @@ To enable them in a commercial project, please contact us. - + number_of_weeks %n semaine(s) @@ -6398,7 +6393,7 @@ To enable them in a commercial project, please contact us. - + number_of_days %n jour(s) @@ -6407,25 +6402,25 @@ To enable them in a commercial project, please contact us. - + today "Aujourd'hui" Today - + yesterday "Hier Yesterday - + duration_tomorrow Tomorrow Tomorrow - + duration_number_of_days %1 jour(s) @@ -6434,51 +6429,54 @@ To enable them in a commercial project, please contact us. - + call_zrtp_token_verification_possible_characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - + information_popup_chatroom_creation_error_message Failed to create 1-1 conversation with %1 ! - + recorder_error Error with the recorder Error with the recorder - - - - + + + + chat_error + Error creating or opening the chat +---------- +Error in the chat Error in the chat - - - - - - - - + + + + + + + + info_popup_error_title Error Error - + info_popup_send_voice_message_error_message Could not send voice message : %1 Could not send voice message : %1 - + info_popup_send_voice_message_sending_error_message Failed to create message from record Failed to create message from record @@ -6647,1117 +6645,1117 @@ To enable them in a commercial project, please contact us. country - + Afghanistan Afghanistan - + Albania Albania - + Algeria Algeria - + AmericanSamoa American Samoa - + Andorra Andorra - + Angola Angola - + Anguilla Anguilla - + AntiguaAndBarbuda Antigua-et-Barbuda - + Argentina Argentina - + Armenia Armenia - + Aruba Aruba - + Australia Australia - + Austria Austria - + Azerbaijan Azerbaijan - + Bahamas Bahamas - + Bahrain Bahrain - + Bangladesh Bangladesh - + Barbados Barbados - + Belarus Belarus - + Belgium Belgium - + Belize Belize - + Benin Benin - + Bermuda Bermuda - + Bhutan Bhutan - + Bolivia Bolivia - + BosniaAndHerzegowina Bosnia And Herzegowina - + Botswana Botswana - + Brazil Brazil - + Brunei Brunei - + Bulgaria Bulgaria - + BurkinaFaso Burkina Faso - + Burundi Burundi - + Cambodia Cambodia - + Cameroon Cameroon - + Canada Canada - + CapeVerde Cape Verde - + CaymanIslands Cayman Islands - + CentralAfricanRepublic Central African Republic - + Chad Chad - + Chile Chile - + China China - + Colombia Colombia - + Comoros Comoros - + PeoplesRepublicOfCongo Peoples Republic Of Congo - + CookIslands Cook Islands - + CostaRica Costa Rica - + IvoryCoast Ivory Coast - + Croatia Croatia - + Cuba Cuba - + Cyprus Cyprus - + CzechRepublic Czech Republic - + Denmark Denmark - + Djibouti Djibouti - + Dominica Dominica - + DominicanRepublic Dominican Republic - + Ecuador Ecuador - + Egypt Egypt - + ElSalvador El Salvador - + EquatorialGuinea Equatorial Guinea - + Eritrea Eritrea - + Estonia Estonia - + Ethiopia Ethiopia - + FalklandIslands Falkland Islands - + FaroeIslands Faroe Islands - + Fiji Fiji - + Finland Finland - + France France - + FrenchGuiana French Guiana - + FrenchPolynesia French Polynesia - + Gabon Gabon - + Gambia Gambia - + Georgia Georgia - + Germany Germany - + Ghana Ghana - + Gibraltar Gibraltar - + Greece Greece - + Greenland Greenland - + Grenada Grenada - + Guadeloupe Guadeloupe - + Guam Guam - + Guatemala Guatemala - + Guinea Guinea - + GuineaBissau Guinea-Bissau - + Guyana Guyana - + Haiti Haiti - + Honduras Honduras - + DemocraticRepublicOfCongo Democratic Republic Of Congo - + HongKong Hong Kong - + Hungary Hungary - + Iceland Iceland - + India India - + Indonesia Indonesia - + Iran Iran - + Iraq Iraq - + Ireland Ireland - + Israel Israel - + Italy Italy - + Jamaica Jamaica - + Japan Japan - + Jordan Jordan - + Kazakhstan Kazakhstan - + Kenya Kenya - + Kiribati Kiribati - + DemocraticRepublicOfKorea Democratic Republic Of Korea - + RepublicOfKorea Republic Of Korea - + Kuwait Kuwait - + Kyrgyzstan Kyrgyzstan - + Laos Laos - + Latvia Latvia - + Lebanon Lebanon - + Lesotho Lesotho - + Liberia Liberia - + Libya Libya - + Liechtenstein Liechtenstein - + Lithuania Lithuania - + Luxembourg Luxembourg - + Macau Macau - + Macedonia Macedonia - + Madagascar Madagascar - + Malawi Malawi - + Malaysia Malaysia - + Maldives Maldives - + Mali Mali - + Malta Malta - + MarshallIslands Marshall Islands - + Martinique Martinique - + Mauritania Mauritania - + Mauritius Mauritius - + Mayotte Mayotte - + Mexico Mexico - + Micronesia Micronesia - + Moldova Moldova - + Monaco Monaco - + Mongolia Mongolia - + Montenegro Montenegro - + Montserrat Montserrat - + Morocco Morocco - + Mozambique Mozambique - + Myanmar Myanmar - + Namibia Namibia - + NauruCountry Nauru Country - + Nepal Nepal - + Netherlands Netherlands - + NewCaledonia New-Caledonia - + NewZealand New-Zealand - + Nicaragua Nicaragua - + Niger Niger - + Nigeria Nigeria - + Niue Niue - + NorfolkIsland Norfolk Island - + NorthernMarianaIslands Northern Mariana Islands - + Norway Norway - + Oman Oman - + Pakistan Pakistan - + Palau Palau - + PalestinianTerritories Palestinian Territories - + Panama Panama - + PapuaNewGuinea Papua-New-Guinea - + Paraguay Paraguay - + Peru Peru - + Philippines Philippines - + Poland Poland - + Portugal Portugal - + PuertoRico Puerto Rico - + Qatar Qatar - + Reunion Reunion - + Romania Romania - + RussianFederation Russian Federation - + Rwanda Rwanda - + SaintHelena Saint-Helena - + SaintKittsAndNevis Saint-Kitts-And-Nevis - + SaintLucia Saint-Lucia - + SaintPierreAndMiquelon Saint-Pierre-And-Miquelon - + SaintVincentAndTheGrenadines Saint-Vincent And The Grenadines - + Samoa Samoa - + SanMarino San-Marino - + SaoTomeAndPrincipe Sao Tome-And-Principe - + SaudiArabia Saudi Arabia - + Senegal Senegal - + Serbia Serbia - + Seychelles Seychelles - + SierraLeone Sierra Leone - + Singapore Singapore - + Slovakia Slovakia - + Slovenia Slovenia - + SolomonIslands Solomon Islands - + Somalia Somalia - + SouthAfrica South Africa - + Spain Spain - + SriLanka Sri Lanka - + Sudan Sudan - + Suriname Suriname - + Swaziland Swaziland - + Sweden Sweden - + Switzerland Switzerland - + Syria Syria - + Taiwan Taiwan - + Tajikistan Tajikistan - + Tanzania Tanzania - + Thailand Thailand - + Togo Togo - + Tokelau Tokelau - + Tonga Tonga - + TrinidadAndTobago Trinidad-And-Tobago - + Tunisia Tunisia - + Turkey Turkey - + Turkmenistan Turkmenistan - + TurksAndCaicosIslands Turks And Caicos Islands - + Tuvalu Tuvalu - + Uganda Uganda - + Ukraine Ukraine - + UnitedArabEmirates United Arab Emirates - + UnitedKingdom United-Kingdom - + UnitedStates United-States - + Uruguay Uruguay - + Uzbekistan Uzbekistan - + Vanuatu Vanuatu - + Venezuela Venezuela - + Vietnam Vietnam - + WallisAndFutunaIslands Wallis And Futuna Islands - + Yemen Yemen - + Zambia Zambia - + Zimbabwe Zimbabwe diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 67c519909..f4827b568 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -700,6 +700,7 @@ info_popup_new_version_download_label + Download it ! Téléchargez-là ! @@ -717,6 +718,7 @@ info_popup_version_up_to_date_title + Up to date À jour @@ -976,8 +978,8 @@ CallHistoryLayout - - + + meeting_info_join_title "Rejoindre la réunion" ---------- @@ -985,31 +987,25 @@ Rejoindre la réunion - - contact_call_history_action - "Call history" - - - - + contact_conversation_action "Conversation" - + Conversation - + contact_call_action "Appel" Appel - + contact_message_action "Message" Message - + contact_video_call_action "Appel Video" Appel Vidéo @@ -1103,6 +1099,7 @@ local_group_call + "Local group call" Appel de groupe local @@ -1413,19 +1410,19 @@ 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 @@ -2348,6 +2345,7 @@ Error popup_error_nb_files_not_found_message + %n files were not found %1 fichiers n'ont pas été trouvés @@ -2368,6 +2366,7 @@ Error popup_error_unsupported_files_message + Unable to get supported mime type for %1 files. Impossible de trouver un type MIME pris en charge pour %1 fichiers. @@ -2765,34 +2764,28 @@ en bout. Seul votre correspondant peut les déchiffrer. CliModel - show_function_description - Afficher + Afficher - fetch_config_function_description - Récupérer une configuration + Récupérer une configuration - call_function_description - Appeler + Appeler - bye_function_description - Raccrocher + Raccrocher - accept_function_description - Accepter + Accepter - decline_function_description - Décliner + Décliner @@ -4395,6 +4388,7 @@ Expiration : %1 default_account_connection_state_error_toast + Erreur durant la connexion, veuillez vérifier vos paramètres Erreur durant la connexion @@ -5970,7 +5964,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. SelectedChatView - + chat_view_group_call_toast_message Démarrer un appel de groupe ? @@ -5980,36 +5974,36 @@ Pour les activer dans un projet commercial, merci de nous contacter.Cette conversation n'est pas chiffrée ! - + reply_to_label Reply to %1 Réponse à %1 - + conversation_editing_message_title Modification du message - + shared_medias_title Shared medias Médias partagés - + shared_documents_title Shared documents Documents partagés - + forward_to_title Forward to… Transférer à… - + conversations_title Conversations Conversations @@ -6167,6 +6161,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. unknown_audio_device_name + "Unknown device" Appareil inconnu @@ -6198,7 +6193,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. Utils - + nMinute %1 minute @@ -6206,7 +6201,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nHour %1 heure @@ -6214,8 +6209,8 @@ Pour les activer dans un projet commercial, merci de nous contacter. - - + + nDay %1 jour @@ -6223,7 +6218,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nWeek %1 semaine @@ -6231,7 +6226,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nSeconds %1 seconde @@ -6239,51 +6234,51 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + contact_presence_status_available Disponible - + contact_presence_status_busy Occupé - + contact_presence_status_do_not_disturb Ne pas déranger - + contact_presence_status_offline Hors ligne - + contact_presence_status_away Inactif/Absent - + information_popup_call_not_created_message "L'appel n'a pas pu être créé" L'appel n'a pas pu être créé - - - + + + information_popup_error_title Failed to create 1-1 conversation with %1 ! Erreur - + information_popup_group_call_not_created_message L'appel de groupe n'a pas pu être créé - + number_of_years %n an(s) @@ -6292,7 +6287,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_month "%n mois" @@ -6301,7 +6296,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_weeks %n semaine(s) @@ -6310,7 +6305,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_days %n jour(s) @@ -6319,25 +6314,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + today "Aujourd'hui" Aujourd'hui - + yesterday "Hier Hier - + duration_tomorrow Tomorrow Demain - + duration_number_of_days %1 jour(s) @@ -6346,105 +6341,108 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + call_zrtp_token_verification_possible_characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - + information_popup_chatroom_creation_error_message Erreur lors de la création de la conversation avec %1 - + recorder_error Error with the recorder Erreur avec l'enregistreur - - - - + + + + chat_error + Error creating or opening the chat +---------- +Error in the chat Erreur dans le chat - + chat_message_forward_error Cannot forward an invalid message Impossible de transférer : message invalide - - - - - - - - + + + + + + + + info_popup_error_title Error Erreur - + info_popup_forward_message_error Could not forward message : %1 Impossible de transférer le message : %1 - + info_popup_send_forward_message_error_message Failed to create forward message Impossible de créer le message - + chat_message_reply_error Cannot reply to invalid message Impossible de répondre : message invalide - + chat_message_edit_error Cannot edit to invalid message Impossible de modifier le message : message invalide - + info_popup_reply_message_error Could not send reply message : %1 Impossible d'envoyer la réponse : %1 - + info_popup_edited_message_error Could not send edited message : %1 Impossible d'envoyer le message modifié : %1 - + info_popup_send_reply_message_error_message Failed to create reply message Impossible de créer le message - + info_popup_send_edited_message_error_message Failed to create edited message Impossible de créer le message modifié - + info_popup_send_voice_message_error_message Could not send voice message : %1 Impossible d'envoyer le message vocal : %1 - + info_popup_send_voice_message_sending_error_message Failed to create message from record Impossible de créer le message vocal @@ -6613,1117 +6611,1117 @@ Pour les activer dans un projet commercial, merci de nous contacter. country - + Afghanistan Afghanistan - + Albania Albanie - + Algeria Algérie - + AmericanSamoa Samoa américaines - + Andorra Andorre - + Angola Angola - + Anguilla Anguilla - + AntiguaAndBarbuda Antigua-et-Barbuda - + Argentina Argentine - + Armenia Arménie - + Aruba Aruba - + Australia Australie - + Austria Autriche - + Azerbaijan Azerbaïdjan - + Bahamas Bahamas - + Bahrain Bahreïn - + Bangladesh Bangladesh - + Barbados Barbade - + Belarus Biélorussie - + Belgium Belgique - + Belize Belize - + Benin Bénin - + Bermuda Bermudes - + Bhutan Bhoutan - + Bolivia Bolivie - + BosniaAndHerzegowina Bosnie-Herzégovine - + Botswana Botswana - + Brazil Brésil - + Brunei Brunéi - + Bulgaria Bulgarie - + BurkinaFaso Burkina Faso - + Burundi Burundi - + Cambodia Cambodge - + Cameroon Cameroun - + Canada Canada - + CapeVerde Cap-Vert - + CaymanIslands Îles Caïmans - + CentralAfricanRepublic République centrafricaine - + Chad Tchad - + Chile Chili - + China Chine - + Colombia Colombie - + Comoros Comores - + PeoplesRepublicOfCongo République populaire du Congo - + CookIslands Îles Cook - + CostaRica Costa Rica - + IvoryCoast Côte d'Ivoire - + Croatia Croatie - + Cuba Cuba - + Cyprus Chypre - + CzechRepublic République Tchèque - + Denmark Danemark - + Djibouti Djibouti - + Dominica Dominique - + DominicanRepublic République dominicaine - + Ecuador Équateur - + Egypt Égypte - + ElSalvador El Salvador - + EquatorialGuinea Guinée équatoriale - + Eritrea Érythrée - + Estonia Estonie - + Ethiopia Éthiopie - + FalklandIslands Îles Falkland - + FaroeIslands Îles Féroé - + Fiji Fidji - + Finland Finlande - + France France - + FrenchGuiana Guyane française - + FrenchPolynesia Polynésie française - + Gabon Gabon - + Gambia Gambie - + Georgia Géorgie - + Germany Allemagne - + Ghana Ghana - + Gibraltar Gibraltar - + Greece Grèce - + Greenland Groenland - + Grenada Grenade - + Guadeloupe Guadeloupe - + Guam Guam - + Guatemala Guatemala - + Guinea Guinée - + GuineaBissau Guinée-Bissau - + Guyana Guyana - + Haiti Haïti - + Honduras Honduras - + DemocraticRepublicOfCongo République démocratique du Congo - + HongKong Hong Kong - + Hungary Hongrie - + Iceland Islande - + India Inde - + Indonesia Indonésie - + Iran Iran - + Iraq Irak - + Ireland Irlande - + Israel Israël - + Italy Italie - + Jamaica Jamaïque - + Japan Japon - + Jordan Jordanie - + Kazakhstan Kazakhstan - + Kenya Kenya - + Kiribati Kiribati - + DemocraticRepublicOfKorea Corée du Nord - + RepublicOfKorea Corée du Sud - + Kuwait Koweït - + Kyrgyzstan Kirghizistan - + Laos Laos - + Latvia Lettonie - + Lebanon Liban - + Lesotho Lesotho - + Liberia Libéria - + Libya Libye - + Liechtenstein Liechtenstein - + Lithuania Lituanie - + Luxembourg Luxembourg - + Macau Macao - + Macedonia Macédoine - + Madagascar Madagascar - + Malawi Malawi - + Malaysia Malaisie - + Maldives Maldives - + Mali Mali - + Malta Malte - + MarshallIslands Îles Marshall - + Martinique Martinique - + Mauritania Mauritanie - + Mauritius Maurice - + Mayotte Mayotte - + Mexico Mexique - + Micronesia Micronésie - + Moldova Moldavie - + Monaco Monaco - + Mongolia Mongolie - + Montenegro Montenegro - + Montserrat Montserrat - + Morocco Maroc - + Mozambique Mozambique - + Myanmar Myanmar - + Namibia Namibie - + NauruCountry Nauru - + Nepal Népal - + Netherlands Pays-Bas - + NewCaledonia Nouvelle-Calédonie - + NewZealand Nouvelle-Zélande - + Nicaragua Nicaragua - + Niger Niger - + Nigeria Nigeria - + Niue Niué - + NorfolkIsland Île Norfolk - + NorthernMarianaIslands Îles Mariannes du Nord - + Norway Norvège - + Oman Oman - + Pakistan Pakistan - + Palau Palaos - + PalestinianTerritories Palestine - + Panama Panama - + PapuaNewGuinea Papouasie-Nouvelle-Guinée - + Paraguay Paraguay - + Peru Pérou - + Philippines Philippines - + Poland Pologne - + Portugal Portugal - + PuertoRico Porto Rico - + Qatar Qatar - + Reunion La Réunion - + Romania Roumanie - + RussianFederation Russie - + Rwanda Rwanda - + SaintHelena Sainte-Hélène - + SaintKittsAndNevis Saint-Christophe-et-Niévès - + SaintLucia Sainte-Lucie - + SaintPierreAndMiquelon Saint-Pierre-et-Miquelon - + SaintVincentAndTheGrenadines Saint-Vincent et les Grenadines - + Samoa Samoa - + SanMarino Saint-Marin - + SaoTomeAndPrincipe Sao Tomé-et-Principe - + SaudiArabia Arabie saoudite - + Senegal Sénégal - + Serbia Serbie - + Seychelles Seychelles - + SierraLeone Sierra Leone - + Singapore Singapour - + Slovakia Slovaquie - + Slovenia Slovénie - + SolomonIslands Îles Salomon - + Somalia Somalie - + SouthAfrica Afrique du Sud - + Spain Espagne - + SriLanka Sri Lanka - + Sudan Soudan - + Suriname Suriname - + Swaziland Eswatini - + Sweden Suède - + Switzerland Suisse - + Syria Syrie - + Taiwan Taïwan - + Tajikistan Tadjikistan - + Tanzania Tanzanie - + Thailand Thaïlande - + Togo Togo - + Tokelau Tokelau - + Tonga Tonga - + TrinidadAndTobago Trinité-et-Tobago - + Tunisia Tunisie - + Turkey Turquie - + Turkmenistan Turkménistan - + TurksAndCaicosIslands Îles Turks et Caïques - + Tuvalu Tuvalu - + Uganda Ouganda - + Ukraine Ukraine - + UnitedArabEmirates Émirats arabes unis - + UnitedKingdom Royaume-Uni - + UnitedStates États-Unis - + Uruguay Uruguay - + Uzbekistan Ouzbékistan - + Vanuatu Vanuatu - + Venezuela Venezuela - + Vietnam Vietnam - + WallisAndFutunaIslands Wallis et Futuna - + Yemen Yémen - + Zambia Zambie - + Zimbabwe Zimbabwe diff --git a/Linphone/model/call-history/CallHistoryModel.cpp b/Linphone/model/call-history/CallHistoryModel.cpp index d902946d4..3333bb45b 100644 --- a/Linphone/model/call-history/CallHistoryModel.cpp +++ b/Linphone/model/call-history/CallHistoryModel.cpp @@ -40,4 +40,8 @@ void CallHistoryModel::removeCallHistory() { mustBeInLinphoneThread(getClassName() + "::removeCallHistory"); qInfo() << "Removing call log: " << Utils::coreStringToAppString(callLog->getCallId()); CoreModel::getInstance()->getCore()->removeCallLog(callLog); +} + +std::shared_ptr CallHistoryModel::getChatRoom() const { + return callLog ? callLog->getChatRoom() : nullptr; } \ No newline at end of file diff --git a/Linphone/model/call-history/CallHistoryModel.hpp b/Linphone/model/call-history/CallHistoryModel.hpp index c9507c456..305ad9304 100644 --- a/Linphone/model/call-history/CallHistoryModel.hpp +++ b/Linphone/model/call-history/CallHistoryModel.hpp @@ -35,6 +35,7 @@ public: ~CallHistoryModel(); void removeCallHistory(); + std::shared_ptr getChatRoom() const; private: std::shared_ptr callLog; diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index d518176fd..e37af5dac 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -22,6 +22,7 @@ #include "UriTools.hpp" #include "core/App.hpp" +#include "core/call-history/CallHistoryGui.hpp" #include "core/call/CallGui.hpp" #include "core/chat/ChatCore.hpp" #include "core/chat/ChatGui.hpp" @@ -34,6 +35,7 @@ #include "core/path/Paths.hpp" #include "core/payload-type/DownloadablePayloadTypeCore.hpp" #include "core/recorder/RecorderGui.hpp" +#include "model/call-history/CallHistoryModel.hpp" #include "model/object/VariantObject.hpp" #include "model/tool/ToolModel.hpp" #include "tool/providers/AvatarProvider.hpp" @@ -1711,6 +1713,22 @@ void Utils::openChat(ChatGui *chat) { } } +VariantObject *Utils::getChatForCallLog(CallHistoryGui *callLog) { + if (!callLog || !callLog->mCore) return nullptr; + VariantObject *data = new VariantObject("lookupCurrentCallChat"); + if (!data) return nullptr; + data->makeRequest([core = callLog->mCore, data]() { + auto model = core->getModel(); + if (!model) return QVariant(); + auto chatRoom = model->getChatRoom(); + if (!chatRoom) return QVariant(); + auto chatCore = ChatCore::create(chatRoom); + return chatCore ? QVariant::fromValue(new ChatGui(chatCore)) : QVariant(); + }); + data->requestValue(); + return data; +} + bool Utils::isEmptyMessage(QString message) { return message.trimmed().isEmpty(); } diff --git a/Linphone/tool/Utils.hpp b/Linphone/tool/Utils.hpp index 3c891add3..fffdc9349 100644 --- a/Linphone/tool/Utils.hpp +++ b/Linphone/tool/Utils.hpp @@ -44,9 +44,9 @@ #endif // ifndef UTILS_NO_BREAK class CallGui; +class CallHistoryGui; class QQuickWindow; class VariantObject; -class CallGui; class ConferenceInfoGui; class ConferenceCore; class ParticipantDeviceCore; @@ -155,6 +155,7 @@ public: Q_INVOKABLE static VariantObject *getChatForAddress(QString address); Q_INVOKABLE static VariantObject *createGroupChat(QString subject, QStringList participantAddresses); Q_INVOKABLE static void openChat(ChatGui *chat); + Q_INVOKABLE static VariantObject *getChatForCallLog(CallHistoryGui *callLog); Q_INVOKABLE static bool isEmptyMessage(QString message); Q_INVOKABLE static VariantObject *encodeTextToQmlRichFormat(const QString &text, const QString &textPartToBold = QString(), diff --git a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml index e74092dd7..8151fa5d8 100644 --- a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml +++ b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml @@ -35,7 +35,6 @@ ColumnLayout { property alias detailContent: detailControl.data signal conferenceChatDisplayRequested() - signal conferenceCallHistoryDisplayRequested() ColumnLayout { spacing: Utils.getSizeWithScreenRatio(13) @@ -149,20 +148,15 @@ ColumnLayout { } LabelButton { visible: !SettingsCpp.disableChatFeature - button.checkable: true width: Utils.getSizeWithScreenRatio(56) height: Utils.getSizeWithScreenRatio(56) button.icon.width: Utils.getSizeWithScreenRatio(24) button.icon.height: Utils.getSizeWithScreenRatio(24) button.icon.source: button.checked ? AppIcons.callList : AppIcons.chatTeardropText - label: button.checked - //: "Call history" - ? qsTr("contact_call_history_action") //: "Conversation" - : qsTr("contact_conversation_action") - button.onCheckedChanged: { - if (button.checked) mainItem.conferenceChatDisplayRequested() - else mainItem.conferenceCallHistoryDisplayRequested() + label: qsTr("contact_conversation_action") + button.onPressed: { + mainItem.conferenceChatDisplayRequested() } } } diff --git a/Linphone/view/Control/Display/Text.qml b/Linphone/view/Control/Display/Text.qml index 4674088bd..7c14b60c3 100644 --- a/Linphone/view/Control/Display/Text.qml +++ b/Linphone/view/Control/Display/Text.qml @@ -14,7 +14,6 @@ Quick.Text { anchors.fill: parent acceptedButtons: Qt.NoButton hoverEnabled: true - onContainsMouseChanged: console.log("mouse area contains mouse", containsMouse) } ToolTip { id: tooltip diff --git a/Linphone/view/Page/Form/Chat/SelectedChatView.qml b/Linphone/view/Page/Form/Chat/SelectedChatView.qml index b74b14629..f7d82cecd 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -22,6 +22,7 @@ FocusScope { property alias callHeaderContent: splitPanel.header.contentItem property bool replyingToMessage: false property bool editingMessage: false + property bool backButtonVisible: false property string lastChar property AccountGui currentAccount: AppCpp.currentAccount property bool showEncryptedInfo: currentAccount && currentAccount.core.limeServerUrl !== "" && currentAccount.core.conferenceFactoryAddress !== "" @@ -29,6 +30,7 @@ FocusScope { signal oneOneCall(bool video) signal groupCall() + signal backButtonPressed() onActiveFocusChanged: if(activeFocus) { if (chatMessagesListView.lastItemVisible) chat.core.lMarkAsRead() @@ -103,7 +105,12 @@ FocusScope { RowLayout { id: headerInfos spacing: Utils.getSizeWithScreenRatio(12) - // property int childrenWidth: + RoundButton { + icon.source: AppIcons.leftArrow + style: ButtonStyle.noBackground + visible: mainItem.backButtonVisible + onPressed: mainItem.backButtonPressed() + } Avatar { property var contactObj: mainItem.chat ? UtilsCpp.findFriendByAddress(mainItem.chat?.core.peerAddress) : null contact: contactObj?.value || null @@ -115,7 +122,6 @@ FocusScope { ColumnLayout { Text { Layout.fillWidth: true - Component.onCompleted: console.log(text, "width", width, "implicitWidth", implicitWidth, "advance", advance, contentWidth) text: UtilsCpp.encodeEmojiToQmlRichFormat(mainItem.chat?.core.title) || "" color: DefaultStyle.main2_600 maximumLineCount: 1 diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index d6ffb7bc3..b60a14bd7 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -591,46 +591,41 @@ AbstractMainPage { } } } - onConferenceChatDisplayRequested: detailContentStack.currentIndex = 1 - onConferenceCallHistoryDisplayRequested: detailContentStack.currentIndex = 0 + onConferenceChatDisplayRequested: { + rightPanelStackView.push(historyChatComp, {"callHistory": mainItem.selectedRowHistoryGui}) + } detailContent: Item { Layout.preferredWidth: Utils.getSizeWithScreenRatio(360) Layout.fillHeight: true RoundedPane { id: detailControl - visible: detailContentStack.currentIndex !== 0 || detailListView.count > 0 + visible: detailListView.count > 0 width: parent.width - height: detailContentStack.currentIndex === 0 - ? Math.min(parent.height, detailListView.contentHeight) + topPadding + bottomPadding - : parent.height + height: Math.min(parent.height, detailListView.contentHeight) + topPadding + bottomPadding background: Rectangle { id: detailListBackground anchors.fill: parent color: DefaultStyle.grey_0 radius: Utils.getSizeWithScreenRatio(15) } - - contentItem: StackLayout { - id: detailContentStack - currentIndex: 0 - 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 + Utils.getSizeWithScreenRatio(8) - spacing: Utils.getSizeWithScreenRatio(14) - clip: true - searchText: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.remoteAddress : "" - busyIndicatorSize: Utils.getSizeWithScreenRatio(40) + 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 + Utils.getSizeWithScreenRatio(8) + spacing: Utils.getSizeWithScreenRatio(14) + clip: true + searchText: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.remoteAddress : "" + busyIndicatorSize: Utils.getSizeWithScreenRatio(40) delegate: Item { width: detailListView.width @@ -660,51 +655,45 @@ AbstractMainPage { } } } - 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 { - text: UtilsCpp.formatDate(modelData.core.date) - color: modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500_main : DefaultStyle.main2_500_main + //: "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: Utils.getSizeWithScreenRatio(12) - weight: Utils.getSizeWithScreenRatio(300) + pixelSize: Typography.p1.pixelSize + weight: Typography.p1.weight } } } - Item { - Layout.fillHeight: true - Layout.fillWidth: true - } Text { - text: UtilsCpp.formatElapsedTime( - modelData.core.duration, - false) + text: UtilsCpp.formatDate(modelData.core.date) + color: modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500_main : DefaultStyle.main2_500_main font { pixelSize: Utils.getSizeWithScreenRatio(12) weight: Utils.getSizeWithScreenRatio(300) } } } + Item { + Layout.fillHeight: true + Layout.fillWidth: true + } + Text { + text: UtilsCpp.formatElapsedTime( + modelData.core.duration, + false) + font { + pixelSize: Utils.getSizeWithScreenRatio(12) + weight: Utils.getSizeWithScreenRatio(300) + } + } } } } - SelectedChatView { - Layout.fillWidth: true - Layout.fillHeight: true - chat: contactDetail.callHistoryGui.core.chatGui - } } } } @@ -714,6 +703,18 @@ AbstractMainPage { } } } + Component { + id: historyChatComp + SelectedChatView { + backButtonVisible: true + property var callHistory: null + property var chatObj: callHistory ? UtilsCpp.getChatForCallLog(callHistory) : null + chat: chatObj ? chatObj.value : null + onBackButtonPressed: { + rightPanelStackView.pop() + } + } + } component IconLabel: RowLayout { id: iconLabel