diff --git a/Classes/Base.lproj/ContactsListView.xib b/Classes/Base.lproj/ContactsListView.xib
index 17f2c9c9d..a847387dc 100644
--- a/Classes/Base.lproj/ContactsListView.xib
+++ b/Classes/Base.lproj/ContactsListView.xib
@@ -12,6 +12,7 @@
+
@@ -179,6 +180,14 @@
+
-
+
@@ -209,7 +218,7 @@
-
+
diff --git a/Classes/ContactsListView.h b/Classes/ContactsListView.h
index d3577d819..bdf6c424b 100644
--- a/Classes/ContactsListView.h
+++ b/Classes/ContactsListView.h
@@ -58,6 +58,7 @@ typedef enum _ContactSelectionMode { ContactSelectionModeNone, ContactSelectionM
@property (weak, nonatomic) IBOutlet UIInterfaceStyleButton *toggleSelectionButton;
@property (weak, nonatomic) IBOutlet UILabel *loadingLabel;
@property (weak, nonatomic) IBOutlet UIView *loadingView;
+@property (weak, nonatomic) IBOutlet UILabel *ldapMoreResultsLabel;
- (IBAction)onAllClick:(id)event;
- (IBAction)onLinphoneClick:(id)event;
diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m
index 158714f8a..179bff692 100644
--- a/Classes/ContactsListView.m
+++ b/Classes/ContactsListView.m
@@ -142,6 +142,11 @@ static UICompositeViewDescription *compositeDescription = nil;
selector:@selector(onMagicSearchFinished:)
name:kLinphoneMagicSearchFinished
object:nil];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(onMagicSearchMoreAvailable:)
+ name:kLinphoneMagicSearchMoreAvailable
+ object:nil];
}
- (void)onMagicSearchStarted:(NSNotification *)k {
@@ -150,6 +155,9 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)onMagicSearchFinished:(NSNotification *)k {
_loadingView.hidden = TRUE;
}
+- (void)onMagicSearchMoreAvailable:(NSNotification *)k {
+ _ldapMoreResultsLabel.hidden = FALSE;
+}
- (void)viewDidAppear:(BOOL)animated {
NSLog(@"Debuglog viewDidAppear");
@@ -292,6 +300,7 @@ static UICompositeViewDescription *compositeDescription = nil;
if (searchText.length == 0) {
[LinphoneManager.instance setContactsUpdated:TRUE];
}
+ _ldapMoreResultsLabel.hidden = TRUE;
[tableController loadDataWithFilter:searchText];
}
}
diff --git a/Classes/LinphoneManager.h b/Classes/LinphoneManager.h
index ec47740c1..82dd9b91f 100644
--- a/Classes/LinphoneManager.h
+++ b/Classes/LinphoneManager.h
@@ -65,6 +65,7 @@ extern NSString *const kLinphoneConfStateParticipantListChanged;
extern NSString *const kLinphoneConfStateChanged;
extern NSString *const kLinphoneMagicSearchStarted;
extern NSString *const kLinphoneMagicSearchFinished;
+extern NSString *const kLinphoneMagicSearchMoreAvailable;
extern NSString *const kLinphoneMsgNotificationAppGroupId;
diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m
index 90b24e5de..6fddff32d 100644
--- a/Classes/LinphoneManager.m
+++ b/Classes/LinphoneManager.m
@@ -81,6 +81,7 @@ NSString *const kLinphoneConfStateChanged = @"kLinphoneConfStateChanged";
NSString *const kLinphoneConfStateParticipantListChanged = @"kLinphoneConfStateParticipantListChanged";
NSString *const kLinphoneMagicSearchStarted = @"LinphoneMagicSearchStarted";
NSString *const kLinphoneMagicSearchFinished = @"LinphoneMagicSearchFinished";
+NSString *const kLinphoneMagicSearchMoreAvailable = @"LinphoneMagicSearchMoreAvailable";
NSString *const kLinphoneMsgNotificationAppGroupId = @"group.org.linphone.phone.msgNotification";
@@ -1422,6 +1423,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
[ConfigManager.instance setDbWithDb:_configDb];
[CallManager.instance setCoreWithCore:theLinphoneCore];
+ [MagicSearchSingleton.instance setupCernLdapWithLc:[LinphoneManager getLc]]; // CERN
[LinphoneManager.instance startLinphoneCore];
diff --git a/Classes/MagicSearch.swift b/Classes/MagicSearch.swift
index 13369618f..fb0629e8e 100644
--- a/Classes/MagicSearch.swift
+++ b/Classes/MagicSearch.swift
@@ -34,6 +34,7 @@ import linphonesw
NotificationCenter.default.post(name: Notification.Name(kLinphoneMagicSearchFinished), object: self)
}, onLdapHaveMoreResults: { (magicSearch: MagicSearch, ldap: Ldap) in
Log.directLog(BCTBX_LOG_MESSAGE, text: "Ldap have more result")
+ NotificationCenter.default.post(name: Notification.Name(kLinphoneMagicSearchMoreAvailable), object: self)
})
magicSearch.addDelegate(delegate: magicSearchDelegate!)