mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 00:02:47 +00:00
Bug Fix - Room Members/Invite screen: Remove the current participants from the default displayed list.
This commit is contained in:
parent
aaded64680
commit
588ec06ac2
1 changed files with 15 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue