mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix crash when deleting a contact with phone and sip address while editing
This commit is contained in:
parent
b5c044bea8
commit
289c996684
2 changed files with 7 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
@private
|
||||
OrderedDictionary *addressBookMap;
|
||||
}
|
||||
@property(nonatomic) BOOL ongoing;
|
||||
- (void)loadData;
|
||||
- (void)loadSearchedData;
|
||||
- (void)removeAllContacts;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@
|
|||
}
|
||||
|
||||
- (void)onAddressBookUpdate:(NSNotification *)k {
|
||||
[self loadData];
|
||||
if (!_ongoing && (PhoneMainView.instance.currentView == ContactsListView.compositeViewDescription)) {
|
||||
[self loadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
|
@ -54,6 +56,7 @@
|
|||
if (self) {
|
||||
[self initContactsTableViewController];
|
||||
}
|
||||
_ongoing = FALSE;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
@ -119,6 +122,7 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
|||
}
|
||||
|
||||
- (void)loadData {
|
||||
_ongoing = TRUE;
|
||||
LOGI(@"Load contact list");
|
||||
@synchronized(addressBookMap) {
|
||||
//Set all contacts from ContactCell to nil
|
||||
|
|
@ -192,6 +196,7 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
|||
}
|
||||
});
|
||||
}
|
||||
_ongoing = FALSE;
|
||||
}
|
||||
|
||||
- (void)loadSearchedData {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue