diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-09-30 03:27:05 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-09-30 03:27:05 +0200 |
commit | 88cbac1695292e1dade325ee26ba5c52467d4b75 (patch) | |
tree | 275ef197ca81de7d08291f937cf4eca0451e4fcf /resources/qml/TimelineRow.qml | |
parent | Make clazy happy (diff) | |
download | nheko-88cbac1695292e1dade325ee26ba5c52467d4b75.tar.xz |
Basic threading support
Diffstat (limited to 'resources/qml/TimelineRow.qml')
-rw-r--r-- | resources/qml/TimelineRow.qml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index dc640099..173c3fb5 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -33,6 +33,7 @@ AbstractButton { required property bool isEdited required property bool isStateEvent required property string replyTo + required property string threadId required property string userId required property string userName required property string roomTopic @@ -58,14 +59,14 @@ AbstractButton { // this looks better without margins TapHandler { acceptedButtons: Qt.RightButton - onSingleTapped: messageContextMenu.show(eventId, type, isSender, isEncrypted, isEditable, contentItem.child.hoveredLink, contentItem.child.copyText) + onSingleTapped: messageContextMenu.show(eventId, threadId, type, isSender, isEncrypted, isEditable, contentItem.child.hoveredLink, contentItem.child.copyText) gesturePolicy: TapHandler.ReleaseWithinBounds acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | PointerDevice.TouchPad } } - onPressAndHold: messageContextMenu.show(eventId, type, isSender, isEncrypted, isEditable, contentItem.child.hoveredLink, contentItem.child.copyText) + onPressAndHold: messageContextMenu.show(eventId, threadId, type, isSender, isEncrypted, isEditable, contentItem.child.hoveredLink, contentItem.child.copyText) onDoubleClicked: chat.model.reply = eventId DragHandler { @@ -229,6 +230,20 @@ AbstractButton { anchors.verticalCenter: ts.verticalCenter } + ImageButton { + visible: threadId + Layout.alignment: Qt.AlignRight | Qt.AlignTop + height: parent.iconSize + width: parent.iconSize + image: ":/icons/icons/ui/thread.svg" + buttonTextColor: TimelineManager.userColor(threadId, Nheko.colors.base) + ToolTip.visible: hovered + ToolTip.delay: Nheko.tooltipDelay + ToolTip.text: qsTr("Part of a thread") + anchors.verticalCenter: ts.verticalCenter + onClicked: room.thread = threadId + } + Image { visible: isEdited || eventId == chat.model.edit Layout.alignment: Qt.AlignRight | Qt.AlignTop |