diff --git a/Linphone/core/chat/message/EventLogProxy.cpp b/Linphone/core/chat/message/EventLogProxy.cpp index 5bc86365c..d61035326 100644 --- a/Linphone/core/chat/message/EventLogProxy.cpp +++ b/Linphone/core/chat/message/EventLogProxy.cpp @@ -149,7 +149,7 @@ void EventLogProxy::setDisplayItemsStep(int step) { } void EventLogProxy::loadUntil(int index) { - if (mMaxDisplayItems < index) setMaxDisplayItems(index + mDisplayItemsStep); + if (mMaxDisplayItems <= index) setMaxDisplayItems(index + mDisplayItemsStep); } int EventLogProxy::findFirstUnreadIndex() { @@ -158,7 +158,7 @@ int EventLogProxy::findFirstUnreadIndex() { auto listIndex = eventLogList->findFirstUnreadIndex(); if (listIndex != -1) { listIndex = mapFromSource(eventLogList->index(listIndex, 0)).row(); - if (mMaxDisplayItems <= listIndex) setMaxDisplayItems(listIndex + mDisplayItemsStep); + loadUntil(listIndex); return listIndex; } else { return 0; diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 5719add64..62fe7120b 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -5880,42 +5880,42 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. SelectedChatView - + chat_view_group_call_toast_message Gruppenanruf starten? - + unencrypted_conversation_warning This conversation is not encrypted ! Dieser Chat ist nicht verschlüsselt! - + reply_to_label Reply to %1 Auf %1 antworten - + shared_medias_title Shared medias Geteilte Medien - + shared_documents_title Shared documents Geteilte Dokumente - + forward_to_title Forward to… Weiterleiten an… - + conversations_title Conversations Chats diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 1e2b3c5b6..1c28060db 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -5757,42 +5757,42 @@ To enable them in a commercial project, please contact us. SelectedChatView - + chat_view_group_call_toast_message Start a group call ? - + unencrypted_conversation_warning This conversation is not encrypted ! This conversation is not encrypted ! - + reply_to_label Reply to %1 Reply to %1 - + 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 diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index b2b65988a..ddc286115 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -5728,42 +5728,42 @@ Pour les activer dans un projet commercial, merci de nous contacter. SelectedChatView - + chat_view_group_call_toast_message Démarrer un appel de groupe ? - + unencrypted_conversation_warning This conversation is not encrypted ! Cette conversation n'est pas chiffrée ! - + reply_to_label Reply to %1 Réponse à %1 - + 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 diff --git a/Linphone/view/Control/Display/Chat/ChatTextContent.qml b/Linphone/view/Control/Display/Chat/ChatTextContent.qml index dcc73bfdd..e907cb0d4 100644 --- a/Linphone/view/Control/Display/Chat/ChatTextContent.qml +++ b/Linphone/view/Control/Display/Chat/ChatTextContent.qml @@ -15,6 +15,9 @@ TextEdit { property string lastTextSelected : '' property string searchedTextPart color: DefaultStyle.main2_700 + // force restoring cursor in case we click on a mention, otherwise + // the cursor stays IBeam + onVisibleChanged: if (!visible) UtilsCpp.restoreGlobalCursor() font { pixelSize: (contentGui && UtilsCpp.isOnlyEmojis(contentGui.core.text)) ? Typography.h1.pixelSize : Typography.p1.pixelSize weight: Typography.p1.weight diff --git a/Linphone/view/Control/Display/Participant/ParticipantInfoListView.qml b/Linphone/view/Control/Display/Participant/ParticipantInfoListView.qml index 32851d00f..57d47627a 100644 --- a/Linphone/view/Control/Display/Participant/ParticipantInfoListView.qml +++ b/Linphone/view/Control/Display/Participant/ParticipantInfoListView.qml @@ -15,6 +15,7 @@ ListView { property ChatGui chatGui height: contentHeight + property int delegateHoverRectangleRadius: 0 signal participantClicked(string username) @@ -60,6 +61,7 @@ ListView { visible: mousearea.containsMouse color: DefaultStyle.main2_200 opacity: 0.5 + radius: mainItem.delegateHoverRectangleRadius } } } diff --git a/Linphone/view/Page/Form/Chat/SelectedChatView.qml b/Linphone/view/Page/Form/Chat/SelectedChatView.qml index 73c14fb21..8f8870415 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -21,6 +21,7 @@ FocusScope { property CallGui call property alias callHeaderContent: splitPanel.header.contentItem property bool replyingToMessage: false + property string lastChar enum PanelType { MessageReactions, SharedFiles, Medias, ImdnStatus, ForwardToList, ManageParticipants, EphemeralSettings, None} signal oneOneCall(bool video) @@ -332,8 +333,9 @@ FocusScope { Control.Control { id: participantListPopup width: parent.width - height: visible ? Math.min(participantInfoList.height, Utils.getSizeWithScreenRatio(200)) : 0 - visible: false + height: Math.min(participantInfoList.height, Utils.getSizeWithScreenRatio(200)) + visible: mainItem.lastChar === "@" + onVisibleChanged: console.log("participant list visible changed", visible, height) anchors.bottom: chatMessagesListView.bottom anchors.left: chatMessagesListView.left anchors.right: chatMessagesListView.right @@ -371,6 +373,7 @@ FocusScope { height: contentHeight width: participantListPopup.width chatGui: mainItem.chat + delegateHoverRectangleRadius: Utils.getSizeWithScreenRatio(20) onParticipantClicked: (username) => { messageSender.text = messageSender.text + username + " " messageSender.textArea.cursorPosition = messageSender.text.length @@ -509,9 +512,7 @@ FocusScope { if (text !== "") { mainItem.chat.core.lCompose() } - var lastChar = text.slice(-1) - if (lastChar == "@") participantListPopup.visible = true - else participantListPopup.visible = false + mainItem.lastChar = text.slice(-1) mainItem.chat.core.sendingText = text } onSendMessage: {