mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-28 01:09:19 +00:00
fix display participant popup when typing @
restore cursor when clicking on mention (cursor was stuck on ibeam)
This commit is contained in:
parent
53c5c9cce1
commit
a51de0ff7f
7 changed files with 34 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -5880,42 +5880,42 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte.
|
|||
<context>
|
||||
<name>SelectedChatView</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="48"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="49"/>
|
||||
<source>chat_view_group_call_toast_message</source>
|
||||
<translation>Gruppenanruf starten?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="144"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="145"/>
|
||||
<source>unencrypted_conversation_warning</source>
|
||||
<extracomment>This conversation is not encrypted !</extracomment>
|
||||
<translation>Dieser Chat ist nicht verschlüsselt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="430"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="433"/>
|
||||
<source>reply_to_label</source>
|
||||
<extracomment>Reply to %1</extracomment>
|
||||
<translation>Auf %1 antworten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="638"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="639"/>
|
||||
<source>shared_medias_title</source>
|
||||
<extracomment>Shared medias</extracomment>
|
||||
<translation>Geteilte Medien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="640"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="641"/>
|
||||
<source>shared_documents_title</source>
|
||||
<extracomment>Shared documents</extracomment>
|
||||
<translation>Geteilte Dokumente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="669"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="670"/>
|
||||
<source>forward_to_title</source>
|
||||
<extracomment>Forward to…</extracomment>
|
||||
<translation>Weiterleiten an…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="703"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="704"/>
|
||||
<source>conversations_title</source>
|
||||
<extracomment>Conversations</extracomment>
|
||||
<translation>Chats</translation>
|
||||
|
|
|
|||
|
|
@ -5757,42 +5757,42 @@ To enable them in a commercial project, please contact us.</translation>
|
|||
<context>
|
||||
<name>SelectedChatView</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="48"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="49"/>
|
||||
<source>chat_view_group_call_toast_message</source>
|
||||
<translation>Start a group call ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="144"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="145"/>
|
||||
<source>unencrypted_conversation_warning</source>
|
||||
<extracomment>This conversation is not encrypted !</extracomment>
|
||||
<translation>This conversation is not encrypted !</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="430"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="433"/>
|
||||
<source>reply_to_label</source>
|
||||
<extracomment>Reply to %1</extracomment>
|
||||
<translation>Reply to %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="638"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="639"/>
|
||||
<source>shared_medias_title</source>
|
||||
<extracomment>Shared medias</extracomment>
|
||||
<translation>Shared medias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="640"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="641"/>
|
||||
<source>shared_documents_title</source>
|
||||
<extracomment>Shared documents</extracomment>
|
||||
<translation>Shared documents</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="669"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="670"/>
|
||||
<source>forward_to_title</source>
|
||||
<extracomment>Forward to…</extracomment>
|
||||
<translation>Forward to…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="703"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="704"/>
|
||||
<source>conversations_title</source>
|
||||
<extracomment>Conversations</extracomment>
|
||||
<translation>Conversations</translation>
|
||||
|
|
|
|||
|
|
@ -5728,42 +5728,42 @@ Pour les activer dans un projet commercial, merci de nous contacter.</translatio
|
|||
<context>
|
||||
<name>SelectedChatView</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="48"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="49"/>
|
||||
<source>chat_view_group_call_toast_message</source>
|
||||
<translation>Démarrer un appel de groupe ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="144"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="145"/>
|
||||
<source>unencrypted_conversation_warning</source>
|
||||
<extracomment>This conversation is not encrypted !</extracomment>
|
||||
<translation>Cette conversation n'est pas chiffrée !</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="430"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="433"/>
|
||||
<source>reply_to_label</source>
|
||||
<extracomment>Reply to %1</extracomment>
|
||||
<translation>Réponse à %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="638"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="639"/>
|
||||
<source>shared_medias_title</source>
|
||||
<extracomment>Shared medias</extracomment>
|
||||
<translation>Médias partagés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="640"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="641"/>
|
||||
<source>shared_documents_title</source>
|
||||
<extracomment>Shared documents</extracomment>
|
||||
<translation>Documents partagés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="669"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="670"/>
|
||||
<source>forward_to_title</source>
|
||||
<extracomment>Forward to…</extracomment>
|
||||
<translation>Transférer à…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="703"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="704"/>
|
||||
<source>conversations_title</source>
|
||||
<extracomment>Conversations</extracomment>
|
||||
<translation>Conversations</translation>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue