Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
change a goto label name
  • Loading branch information
DT-1236 committed Jul 25, 2019
commit 9ac33e562a2c47eab2ae141cd56b97fa6b65e4ba
6 changes: 3 additions & 3 deletions ios/RCTContacts/RCTContacts.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ -(void) getContactsFromAddressBook:(CNContactStore *)store
}

for (NSString *term in searchTerms) {
// nextTerm: continues to the next term in searchTerms; incompleteMatch: skips adding contact to results
// nextTerm: continues to the next term in searchTerms; skipToNextContact: skips adding contact to results
for (NSString *name in names) {
if ([name rangeOfString:term options:(NSAnchoredSearch | NSCaseInsensitiveSearch)].location != NSNotFound) {
goto nextTerm;
Expand All @@ -172,12 +172,12 @@ -(void) getContactsFromAddressBook:(CNContactStore *)store
}
}
}
goto incompleteMatch;
goto skipToNextContact;
nextTerm:;
}

[contacts addObject:[self contactToDictionary:contact withThumbnails:YES]];
incompleteMatch:;
skipToNextContact:;
}];

callback(@[[NSNull null], contacts]);
Expand Down