reorder context menu entries for ConferenceDetailsActivity and make membership and ban options visible in standardmode and make adminprevileges visible in advanced mode

This commit is contained in:
Christian Schneppe 2018-02-02 22:08:42 +01:00
parent 18c5fac826
commit a12f791761
2 changed files with 11 additions and 11 deletions

View file

@ -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);

View file

@ -37,12 +37,12 @@
android:id="@+id/remove_membership"
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>