mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-02 20:16:25 +00:00
ui fix
This commit is contained in:
parent
e2ce00b948
commit
7cfd81e4eb
1 changed files with 5 additions and 5 deletions
|
|
@ -23,8 +23,8 @@
|
||||||
|
|
||||||
- (void)viewWillAppear:(BOOL)animated {
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
self.allContacts = [[NSMutableDictionary alloc] initWithDictionary:LinphoneManager.instance.fastAddressBook.addressBookMap];
|
_allContacts = [[NSMutableDictionary alloc] initWithDictionary:LinphoneManager.instance.fastAddressBook.addressBookMap];
|
||||||
self.sortedAddresses = [[LinphoneManager.instance.fastAddressBook.addressBookMap allKeys] sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
|
_sortedAddresses = [[LinphoneManager.instance.fastAddressBook.addressBookMap allKeys] sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
|
||||||
Contact* first = [_allContacts objectForKey:a];
|
Contact* first = [_allContacts objectForKey:a];
|
||||||
Contact* second = [_allContacts objectForKey:b];
|
Contact* second = [_allContacts objectForKey:b];
|
||||||
if([[first.firstName lowercaseString] compare:[second.firstName lowercaseString]] == NSOrderedSame)
|
if([[first.firstName lowercaseString] compare:[second.firstName lowercaseString]] == NSOrderedSame)
|
||||||
|
|
@ -33,13 +33,13 @@
|
||||||
return [[first.firstName lowercaseString] compare:[second.firstName lowercaseString]];
|
return [[first.firstName lowercaseString] compare:[second.firstName lowercaseString]];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
_contacts = [[NSMutableDictionary alloc] initWithCapacity:_sortedAddresses.count];
|
||||||
if(_notFirstTime) {
|
if(_notFirstTime) {
|
||||||
for(NSString *addr in _contactsGroup) {
|
for(NSString *addr in _contactsGroup) {
|
||||||
[_collectionView registerClass:UIChatCreateCollectionViewCell.class forCellWithReuseIdentifier:addr];
|
[_collectionView registerClass:UIChatCreateCollectionViewCell.class forCellWithReuseIdentifier:addr];
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_contacts = [[NSMutableDictionary alloc] initWithCapacity:_allContacts.count];
|
|
||||||
_contactsGroup = [[NSMutableArray alloc] init];
|
_contactsGroup = [[NSMutableArray alloc] init];
|
||||||
_allFilter = TRUE;
|
_allFilter = TRUE;
|
||||||
|
|
||||||
|
|
@ -199,8 +199,8 @@
|
||||||
completion:nil];
|
completion:nil];
|
||||||
}
|
}
|
||||||
[_collectionView reloadData];
|
[_collectionView reloadData];
|
||||||
if(!cell.selectedImage.hidden) {
|
if (!cell.selectedImage.hidden) {
|
||||||
index = _contactsGroup.count-1;
|
index = _contactsGroup.count - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue