Remove mouseArea from TimelineContainer

This was incorect (anchors in layout) and was replaced by TapHandler
like the rest of the code was already using.
This commit is contained in:
Carl Schwan
2021-03-18 01:21:16 +01:00
parent 38e2c7222b
commit ee9f521a37
2 changed files with 8 additions and 6 deletions

View File

@@ -24,7 +24,6 @@ Item {
readonly property color authorColor: eventType == "notice" ? Kirigami.Theme.activeTextColor : author.color
readonly property color replyAuthorColor: replyVisible ? reply.author.color : Kirigami.Theme.focusColor
property alias mouseArea: controlContainer.children
property bool isEmote: false
property bool cardBackground: true
property bool isLoaded

View File

@@ -346,11 +346,6 @@ Kirigami.ScrollablePage {
width: messageListView.width - Kirigami.Units.largeSpacing
isLoaded: timelineDelegateChooser.delegateLoaded
isEmote: true
mouseArea: MouseArea {
acceptedButtons: Qt.RightButton
anchors.fill: parent
onClicked: openMessageContext(author, display, eventId, toolTip);
}
onReplyClicked: goToEvent(eventID)
onReplyToMessageClicked: replyToMessage(replyUser, replyContent, eventId);
onEdit: chatBox.edit(message, formattedBody, eventId)
@@ -362,6 +357,14 @@ Kirigami.ScrollablePage {
Layout.fillWidth: true
Layout.rightMargin: Kirigami.Units.largeSpacing
Layout.leftMargin: Kirigami.Units.largeSpacing
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: openMessageContext(author, display, eventId, toolTip)
}
TapHandler {
acceptedButtons: Qt.LeftButton
onLongPressed: openMessageContext(author, display, eventId, toolTip)
}
}
}
}