mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-26 00:08:11 +00:00
Fixed contacts from remote LDAP/CardDAV not shown in contacts list when doing a search
This commit is contained in:
parent
8f52182959
commit
83f249b1d9
2 changed files with 5 additions and 4 deletions
|
|
@ -524,9 +524,10 @@ class ContactsManager
|
|||
}
|
||||
|
||||
@WorkerThread
|
||||
fun isContactTemporary(friend: Friend): Boolean {
|
||||
fun isContactTemporary(friend: Friend, allowNullFriendList: Boolean = false): Boolean {
|
||||
val friendList = friend.friendList
|
||||
return friendList == null || friendList.displayName == FRIEND_LIST_TEMPORARY_STORED_NATIVE || friendList.displayName == FRIEND_LIST_TEMPORARY_STORED_REMOTE_DIRECTORY
|
||||
if (friendList == null && !allowNullFriendList) return true
|
||||
return friendList?.displayName == FRIEND_LIST_TEMPORARY_STORED_NATIVE || friendList?.displayName == FRIEND_LIST_TEMPORARY_STORED_REMOTE_DIRECTORY
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ class ContactsListViewModel
|
|||
for (result in results) {
|
||||
val friend = result.friend
|
||||
if (friend != null) {
|
||||
if (coreContext.contactsManager.isContactTemporary(friend)) continue
|
||||
if (coreContext.contactsManager.isContactTemporary(friend, allowNullFriendList = true)) continue
|
||||
|
||||
if (friend.refKey.orEmpty().isEmpty()) {
|
||||
if (friend.vcard != null) {
|
||||
|
|
@ -333,7 +333,7 @@ class ContactsListViewModel
|
|||
favourites.postValue(favouritesList)
|
||||
contactsList.postValue(list)
|
||||
|
||||
Log.i("$TAG Processed [${results.size}] results")
|
||||
Log.i("$TAG Processed [${results.size}] results into [${list.size} contacts]")
|
||||
firstLoad = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue