diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-05-05 21:00:37 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-05-05 21:00:37 +0200 |
commit | 8e8ea0845e3c98785ef7d259a5c3f02b65cee686 (patch) | |
tree | 48e34223e1a44af67b5ca86c26ca0c768bfc7acb /src | |
parent | da80d3b3863cf2c4e8226b728db95074f1226113 (diff) |
ban can be disabled in Config.java
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/Config.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java index 3e946c397..6b0038ded 100644 --- a/src/main/java/de/pixart/messenger/Config.java +++ b/src/main/java/de/pixart/messenger/Config.java @@ -64,6 +64,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/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index 8d9fefe05..6465d0364 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -423,14 +423,18 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers removeAdminPrivileges.setVisible(true); } } else { - removeFromRoom.setVisible(true); + if (!Config.DISABLE_BAN || mConversation.getMucOptions().membersOnly()) { + removeFromRoom.setVisible(true); + } } if (user.getAffiliation() == MucOptions.Affiliation.NONE) { giveMembership.setVisible(true); } else { removeMembership.setVisible(true); } - banFromConference.setVisible(true); + if (!Config.DISABLE_BAN) { + banFromConference.setVisible(true); + } } } else { |