Apply changes from SDK regarding vCards API
This commit is contained in:
parent
4f667c7734
commit
9aea53345c
4 changed files with 20 additions and 20 deletions
|
@ -99,7 +99,7 @@ class ContactEditorViewModel(val c: Contact?) : ViewModel(), ContactViewModelInt
|
|||
} else {
|
||||
val friend = contact.friend ?: coreContext.core.createFriend()
|
||||
friend.edit()
|
||||
friend.setName("${firstName.value.orEmpty()} ${lastName.value.orEmpty()}")
|
||||
friend.name = "${firstName.value.orEmpty()} ${lastName.value.orEmpty()}"
|
||||
|
||||
for (address in friend.addresses) {
|
||||
friend.removeAddress(address)
|
||||
|
@ -121,9 +121,9 @@ class ContactEditorViewModel(val c: Contact?) : ViewModel(), ContactViewModelInt
|
|||
|
||||
val vCard = friend.vcard
|
||||
if (vCard != null) {
|
||||
vCard.organization = organization.value.orEmpty()
|
||||
vCard.familyName = lastName.value.orEmpty()
|
||||
vCard.givenName = firstName.value.orEmpty()
|
||||
vCard.organization = organization.value
|
||||
vCard.familyName = lastName.value
|
||||
vCard.givenName = firstName.value
|
||||
}
|
||||
friend.done()
|
||||
|
||||
|
|
|
@ -176,13 +176,13 @@ class NativeContact(val nativeId: String, private val lookupKey: String? = null)
|
|||
if (friend != null) {
|
||||
friend.edit()
|
||||
val fn = fullName
|
||||
if (fn != null) friend.setName(fn)
|
||||
if (fn != null) friend.name = fn
|
||||
|
||||
val vCard = friend.vcard
|
||||
if (vCard != null) {
|
||||
vCard.familyName = lastName
|
||||
vCard.givenName = firstName
|
||||
if (organization != null) vCard.organization = organization
|
||||
vCard.organization = organization
|
||||
}
|
||||
|
||||
if (!created) {
|
||||
|
|
|
@ -54,10 +54,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{historyClickListener}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineTop"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_history_unread_count_land"
|
||||
android:onClick="@{historyClickListener}">
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_history_unread_count_land">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/history"
|
||||
|
@ -84,9 +84,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{contactsClickListener}"
|
||||
app:layout_constraintTop_toTopOf="@id/guidelineTop"
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineMiddle"
|
||||
android:onClick="@{contactsClickListener}">
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineMiddle">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -102,9 +102,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{dialerClickListener}"
|
||||
app:layout_constraintTop_toTopOf="@id/guidelineMiddle"
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineBottom"
|
||||
android:onClick="@{dialerClickListener}">
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineBottom">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -120,10 +120,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{chatClickListener}"
|
||||
app:layout_constraintTop_toTopOf="@id/guidelineBottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_chat_unread_count_land"
|
||||
android:onClick="@{chatClickListener}">
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_chat_unread_count_land">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/chat"
|
||||
|
|
|
@ -51,11 +51,11 @@
|
|||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{historyClickListener}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineLeft"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_history_unread_count"
|
||||
android:background="@drawable/footer_button">
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_history_unread_count">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/history"
|
||||
|
@ -82,10 +82,10 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{contactsClickListener}"
|
||||
app:layout_constraintStart_toStartOf="@id/guidelineLeft"
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineMiddle"
|
||||
android:background="@drawable/footer_button">
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineMiddle">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -100,10 +100,10 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{dialerClickListener}"
|
||||
app:layout_constraintStart_toStartOf="@id/guidelineMiddle"
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineRight"
|
||||
android:background="@drawable/footer_button">
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineRight">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue