mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed LDAP/remote CardDAV results not always displayed when making a search in contacts list
This commit is contained in:
parent
74ca9145c0
commit
07387d3537
2 changed files with 10 additions and 2 deletions
|
|
@ -309,7 +309,9 @@ class ContactViewModel
|
|||
@WorkerThread
|
||||
fun refreshContactInfo() {
|
||||
isFavourite.postValue(friend.starred)
|
||||
isStored.postValue(friend.inList())
|
||||
// Do not show edit contact button for contacts not stored in a FriendList or
|
||||
// if they are in a temporary one (for example if they are from a remote directory such as LDAP or CardDAV)
|
||||
isStored.postValue(!coreContext.contactsManager.isContactTemporary(friend))
|
||||
|
||||
contact.value?.destroy()
|
||||
contact.postValue(ContactAvatarModel(friend))
|
||||
|
|
|
|||
|
|
@ -295,7 +295,13 @@ class ContactsListViewModel
|
|||
for (result in results) {
|
||||
val friend = result.friend
|
||||
if (friend != null) {
|
||||
if (coreContext.contactsManager.isContactTemporary(friend, allowNullFriendList = true)) continue
|
||||
val isFromRemoteDirectory = result.hasSourceFlag(MagicSearch.Source.LdapServers) || result.hasSourceFlag(MagicSearch.Source.RemoteCardDAV)
|
||||
// Only display friends from temporary friend lists if their source flag show they
|
||||
// were fetched from a remote contact directory (and not the local friend list)
|
||||
if (!isFromRemoteDirectory && coreContext.contactsManager.isContactTemporary(friend, allowNullFriendList = true)) {
|
||||
Log.i("$TAG Do not show friend [${friend.name}] which is in a temporary friend list")
|
||||
continue
|
||||
}
|
||||
|
||||
if (friend.refKey.orEmpty().isEmpty()) {
|
||||
if (friend.vcard != null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue