From 1fcd69ce40c26b207c35f58fdb21c808bf98aa8a Mon Sep 17 00:00:00 2001 From: ChaosKid42 Date: Sat, 5 May 2018 19:40:43 +0200 Subject: [PATCH] ban can be disabled in Config.java (#3016) --- src/main/java/eu/siacs/conversations/Config.java | 2 ++ .../siacs/conversations/ui/ConferenceDetailsActivity.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index db4009910..51f2be859 100644 --- a/src/main/java/eu/siacs/conversations/Config.java +++ b/src/main/java/eu/siacs/conversations/Config.java @@ -52,6 +52,8 @@ public final class Config { public static final boolean ALWAYS_NOTIFY_BY_DEFAULT = false; + public static final boolean DISABLE_BAN = false; // disables the ability to ban users from rooms + public static final int PING_MAX_INTERVAL = 300; public static final int IDLE_PING_INTERVAL = 600; //540 is minimum according to docs; public static final int PING_MIN_INTERVAL = 30; diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 222c4f57e..784147edf 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -378,9 +378,13 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers } else { removeMembership.setVisible(true); } - banFromConference.setVisible(true); + if (!Config.DISABLE_BAN) { + banFromConference.setVisible(true); + } } else { - removeFromRoom.setVisible(true); + if (!Config.DISABLE_BAN || mConversation.getMucOptions().membersOnly()) { + removeFromRoom.setVisible(true); + } } if (user.getAffiliation() != MucOptions.Affiliation.ADMIN) { giveAdminPrivileges.setVisible(true);