From 5b460861b126a49f1e186c8b59ffb0faf0109aab Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 17 Aug 2021 23:31:25 +0200 Subject: Allow accepting knocks in the timeline As well as selecting more join rules. --- resources/qml/delegates/MessageDelegate.qml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'resources/qml/delegates/MessageDelegate.qml') 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) + } + } } -- cgit 1.5.1