summary refs log tree commit diff
path: root/resources/qml/delegates/MessageDelegate.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-08-17 23:31:25 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-08-17 23:31:25 +0200
commit5b460861b126a49f1e186c8b59ffb0faf0109aab (patch)
tree1dab81bfa63dac47608430b34163f7df51194c8a /resources/qml/delegates/MessageDelegate.qml
parentLoad message list async (diff)
downloadnheko-5b460861b126a49f1e186c8b59ffb0faf0109aab.tar.xz
Allow accepting knocks in the timeline
As well as selecting more join rules.
Diffstat (limited to 'resources/qml/delegates/MessageDelegate.qml')
-rw-r--r--resources/qml/delegates/MessageDelegate.qml24
1 files changed, 19 insertions, 5 deletions
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index a8bdf183..893edc77 100644
--- a/resources/qml/delegates/MessageDelegate.qml
+++ b/resources/qml/delegates/MessageDelegate.qml
@@ -3,6 +3,8 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import QtQuick 2.6
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.2
 import im.nheko 1.0
 
 Item {
@@ -357,11 +359,23 @@ Item {
         DelegateChoice {
             roleValue: MtxEvent.Member
 
-            NoticeMessage {
-                body: formatted
-                isOnlyEmoji: false
-                isReply: d.isReply
-                formatted: d.relatedEventCacheBuster, room.formatMemberEvent(d.eventId)
+            ColumnLayout {
+                width: parent ? parent.width : undefined
+
+                NoticeMessage {
+                    body: formatted
+                    isOnlyEmoji: false
+                    isReply: d.isReply
+                    formatted: d.relatedEventCacheBuster, room.formatMemberEvent(d.eventId)
+                }
+
+                Button {
+                    visible: d.relatedEventCacheBuster, room.showAcceptKnockButton(d.eventId)
+                    palette: Nheko.colors
+                    text: qsTr("Allow them in")
+                    onClicked: room.acceptKnock(eventId)
+                }
+
             }
 
         }