mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Removed TODOs related to friends' refKey
This commit is contained in:
parent
90971224d5
commit
4f5ea3b5a4
2 changed files with 12 additions and 12 deletions
|
|
@ -210,15 +210,11 @@ class ContactNewOrEditViewModel @UiThread constructor() : GenericViewModel() {
|
|||
updatePhoneNumbers()
|
||||
|
||||
if (isEdit.value == false) {
|
||||
if (friend.vcard?.generateUniqueId() == true) {
|
||||
friend.refKey = friend.vcard?.uid
|
||||
Log.i(
|
||||
"$TAG Newly created friend will have generated ref key [${friend.refKey}]"
|
||||
)
|
||||
} else {
|
||||
Log.e("$TAG Failed to generate a ref key using vCard's generateUniqueId()")
|
||||
// TODO: generate unique ref key?
|
||||
}
|
||||
friend.vcard?.generateUniqueId()
|
||||
friend.refKey = friend.vcard?.uid
|
||||
Log.i(
|
||||
"$TAG Newly created friend will have generated ref key [${friend.refKey}]"
|
||||
)
|
||||
|
||||
friend.isSubscribesEnabled = false
|
||||
// Disable peer to peer short term presence
|
||||
|
|
|
|||
|
|
@ -281,9 +281,13 @@ class ContactsListViewModel @UiThread constructor() : AbstractMainViewModel() {
|
|||
|
||||
for (result in results) {
|
||||
val friend = result.friend
|
||||
if (friend != null && result.sourceFlags == MagicSearch.Source.LdapServers.toInt()) {
|
||||
// TODO FIXME: Fix issue in SDK, each LDAP friend should have a proper refKey
|
||||
friend.refKey = friend.name
|
||||
if (friend != null && friend.refKey.orEmpty().isEmpty()) {
|
||||
if (friend.vcard != null) {
|
||||
friend.vcard?.generateUniqueId()
|
||||
friend.refKey = friend.vcard?.uid
|
||||
} else {
|
||||
friend.refKey = friend.name
|
||||
}
|
||||
}
|
||||
|
||||
val model = if (friend != null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue