Bug Fix - Room Members/Invite screen: Remove the current participants from the default displayed list.

This commit is contained in:
giomfo 2016-12-28 12:15:31 +01:00
parent aaded64680
commit 588ec06ac2

View file

@ -826,6 +826,21 @@
// Display by default all the contacts who share a private room with the current user
invitableContacts = [NSMutableArray arrayWithArray:[[MXKContactManager sharedManager] privateMatrixContacts:self.mxRoom.mxSession]];
// Remove the current participants
for (NSUInteger index = 0; index < invitableContacts.count;)
{
MXKContact* contact = invitableContacts[index];
if ([contactsById objectForKey:contact.matrixIdentifiers.firstObject] != nil)
{
[invitableContacts removeObject:contact];
}
else
{
// Next
index ++;
}
}
// Sort alphabetically this list of contacts
[self sortAlphabeticallyInvitableContacts];
}