summary refs log tree commit diff
path: root/resources/qml/delegates
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-12-13 05:08:05 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-12-13 05:08:22 +0100
commit952827d629bbb7571f290dad63ae5dad69646472 (patch)
treed07ccc332da509ff870c9ad5f9ff56883ccd8efe /resources/qml/delegates
parentDisable keyboard selection for text by default (diff)
downloadnheko-952827d629bbb7571f290dad63ae5dad69646472.tar.xz
Add a button to room the upgraded room in the timeline
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r--resources/qml/delegates/MessageDelegate.qml28
1 files changed, 28 insertions, 0 deletions
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml

index 3725be05..c2d49e91 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml
@@ -62,6 +62,33 @@ Item { } DelegateChoice { + roleValue: MtxEvent.Tombstone + + + ColumnLayout { + width: parent.width + + NoticeMessage { + body: formatted + isOnlyEmoji: false + isReply: d.isReply + keepFullText: d.keepFullText + isStateEvent: d.isStateEvent + Layout.fillWidth: true + formatted: qsTr("This room was replaced for the following reason: %1").arg(d.body) + } + + Button { + palette: Nheko.colors + Layout.alignment: Qt.AlignHCenter + text: qsTr("Go to replacement room") + onClicked: room.joinReplacementRoom(eventId) + } + + } + } + + DelegateChoice { roleValue: MtxEvent.TextMessage TextMessage { @@ -579,6 +606,7 @@ Item { Button { visible: d.relatedEventCacheBuster, room.showAcceptKnockButton(d.eventId) palette: Nheko.colors + Layout.alignment: Qt.AlignHCenter text: qsTr("Allow them in") onClicked: room.acceptKnock(eventId) }