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/RoomSettings.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'resources/qml/RoomSettings.qml') diff --git a/resources/qml/RoomSettings.qml b/resources/qml/RoomSettings.qml index 491a336f..92cd431a 100644 --- a/resources/qml/RoomSettings.qml +++ b/resources/qml/RoomSettings.qml @@ -186,7 +186,16 @@ ApplicationWindow { ComboBox { enabled: roomSettings.canChangeJoinRules - model: [qsTr("Anyone and guests"), qsTr("Anyone"), qsTr("Invited users")] + model: { + let opts = [qsTr("Anyone and guests"), qsTr("Anyone"), qsTr("Invited users")]; + if (roomSettings.supportsKnocking) + opts.push(qsTr("By knocking")); + + if (roomSettings.supportsRestricted) + opts.push(qsTr("Restricted by membership in other rooms")); + + return opts; + } currentIndex: roomSettings.accessJoinRules onActivated: { roomSettings.changeAccessRules(index); -- cgit 1.5.1