Allow future display of pending member count.

This commit is contained in:
Alan Evans
2020-03-06 17:54:14 -04:00
committed by Greyson Parrelli
parent 1068c3ca7e
commit 033bf77cbb
5 changed files with 61 additions and 24 deletions

View File

@@ -336,10 +336,11 @@ public class ConversationFragment extends Fragment
return;
}
Recipient recipient = recipientInfo.getRecipient();
boolean isSelf = Recipient.self().equals(recipient);
int memberCount = recipientInfo.getGroupMemberCount();
List<String> groups = recipientInfo.getSharedGroups();
Recipient recipient = recipientInfo.getRecipient();
boolean isSelf = Recipient.self().equals(recipient);
int memberCount = recipientInfo.getGroupMemberCount();
int pendingMemberCount = recipientInfo.getGroupPendingMemberCount();
List<String> groups = recipientInfo.getSharedGroups();
if (recipient != null) {
conversationBanner.setAvatar(GlideApp.with(context), recipient);
@@ -348,7 +349,14 @@ public class ConversationFragment extends Fragment
conversationBanner.setTitle(title);
if (recipient.isGroup()) {
conversationBanner.setSubtitle(context.getResources().getQuantityString(R.plurals.MessageRequestProfileView_members, memberCount, memberCount));
if (pendingMemberCount > 0) {
conversationBanner.setSubtitle(context.getResources()
.getQuantityString(R.plurals.MessageRequestProfileView_members_and_invited, memberCount,
memberCount, pendingMemberCount));
} else {
conversationBanner.setSubtitle(context.getResources().getQuantityString(R.plurals.MessageRequestProfileView_members, memberCount,
memberCount));
}
} else if (isSelf) {
conversationBanner.setSubtitle(context.getString(R.string.ConversationFragment__you_can_add_notes_for_yourself_in_this_conversation));
} else {