diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-02-02 22:08:42 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-02-02 22:08:42 +0100 |
commit | a12f791761c70a4464d8d9009397f38f260cae25 (patch) | |
tree | c41c6c8e9935d7ab9ab327fa53b66b55dd92d741 /src/main | |
parent | 18c5fac826bdd1da55c967836687418b0ace44bb (diff) |
reorder context menu entries for ConferenceDetailsActivity and make membership and ban options visible in standardmode and make adminprevileges visible in advanced mode
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 14 | ||||
-rw-r--r-- | src/main/res/menu/muc_details_context.xml | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index 116f174db..6c41187e0 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -459,20 +459,20 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers if (self.getAffiliation().ranks(MucOptions.Affiliation.ADMIN) && self.getAffiliation().outranks(user.getAffiliation())) { if (mAdvancedMode) { - if (user.getAffiliation() == MucOptions.Affiliation.NONE) { - giveMembership.setVisible(true); + if (user.getAffiliation() != MucOptions.Affiliation.ADMIN) { + giveAdminPrivileges.setVisible(true); } else { - removeMembership.setVisible(true); + removeAdminPrivileges.setVisible(true); } - banFromConference.setVisible(true); } else { removeFromRoom.setVisible(true); } - if (user.getAffiliation() != MucOptions.Affiliation.ADMIN) { - giveAdminPrivileges.setVisible(true); + if (user.getAffiliation() == MucOptions.Affiliation.NONE) { + giveMembership.setVisible(true); } else { - removeAdminPrivileges.setVisible(true); + removeMembership.setVisible(true); } + banFromConference.setVisible(true); } } else { MenuItem sendPrivateMessage = menu.findItem(R.id.send_private_message); diff --git a/src/main/res/menu/muc_details_context.xml b/src/main/res/menu/muc_details_context.xml index f337bf175..94693c0a5 100644 --- a/src/main/res/menu/muc_details_context.xml +++ b/src/main/res/menu/muc_details_context.xml @@ -38,11 +38,11 @@ android:title="@string/remove_membership" android:visible="false" /> <item - android:id="@+id/ban_from_conference" - android:title="@string/ban_from_conference" - android:visible="false" /> - <item android:id="@+id/remove_from_room" android:title="@string/remove_from_room" android:visible="false" /> + <item + android:id="@+id/ban_from_conference" + android:title="@string/ban_from_conference" + android:visible="false" /> </menu> |