display invite again menu item for offline members

This commit is contained in:
Daniel Gultsch 2016-06-01 00:12:14 +02:00
parent ffba53777c
commit 24ea66c9fc
3 changed files with 10 additions and 1 deletions

View File

@ -380,10 +380,14 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
MenuItem removeAdminPrivileges = menu.findItem(R.id.remove_admin_privileges); MenuItem removeAdminPrivileges = menu.findItem(R.id.remove_admin_privileges);
MenuItem removeFromRoom = menu.findItem(R.id.remove_from_room); MenuItem removeFromRoom = menu.findItem(R.id.remove_from_room);
MenuItem banFromConference = menu.findItem(R.id.ban_from_conference); MenuItem banFromConference = menu.findItem(R.id.ban_from_conference);
MenuItem invite = menu.findItem(R.id.invite);
startConversation.setVisible(true); startConversation.setVisible(true);
if (contact != null) { if (contact != null) {
showContactDetails.setVisible(true); showContactDetails.setVisible(true);
} }
if (user.getRole() == MucOptions.Role.NONE) {
invite.setVisible(true);
}
if (self.getAffiliation().ranks(MucOptions.Affiliation.ADMIN) && if (self.getAffiliation().ranks(MucOptions.Affiliation.ADMIN) &&
self.getAffiliation().outranks(user.getAffiliation())) { self.getAffiliation().outranks(user.getAffiliation())) {
if (mAdvancedMode) { if (mAdvancedMode) {
@ -404,7 +408,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
} }
} else { } else {
MenuItem sendPrivateMessage = menu.findItem(R.id.send_private_message); MenuItem sendPrivateMessage = menu.findItem(R.id.send_private_message);
sendPrivateMessage.setVisible(true); sendPrivateMessage.setVisible(user.getRole().ranks(MucOptions.Role.PARTICIPANT));
} }
} }

View File

@ -8,6 +8,10 @@
android:id="@+id/action_contact_details" android:id="@+id/action_contact_details"
android:title="@string/action_contact_details" android:title="@string/action_contact_details"
android:visible="false"/> android:visible="false"/>
<item
android:id="@+id/invite"
android:title="@string/invite_again"
android:visible="false"/>
<item <item
android:id="@+id/send_private_message" android:id="@+id/send_private_message"
android:title="@string/send_private_message" android:title="@string/send_private_message"

View File

@ -648,4 +648,5 @@
<string name="conference_subject">Subject</string> <string name="conference_subject">Subject</string>
<string name="choose_participants">Choose participants</string> <string name="choose_participants">Choose participants</string>
<string name="creating_conference">Creating conference…</string> <string name="creating_conference">Creating conference…</string>
<string name="invite_again">Invite again</string>
</resources> </resources>