diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/compose/AttachmentAdapter.kt b/presentation/src/main/java/com/moez/QKSMS/feature/compose/AttachmentAdapter.kt index a158a3951cc8e328fbaa28c7cb79cfa6d27bace1..82b91040369f15ca7c24eadc9366f5dfc6da22e5 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/compose/AttachmentAdapter.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/compose/AttachmentAdapter.kt @@ -19,6 +19,7 @@ package com.moez.QKSMS.feature.compose import android.content.Context +import android.util.Log import android.view.LayoutInflater import android.view.ViewGroup import com.bumptech.glide.Glide @@ -80,7 +81,7 @@ class AttachmentAdapter @Inject constructor( .mapNotNull { vCard -> Ezvcard.parse(vCard).first() } .subscribeOn(Schedulers.computation()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe { vcard -> view.name?.text = vcard.formattedName.value } + .subscribe( { vcard -> view.name?.text = vcard.formattedName.value }, { throwable -> Log.i("AttachmentAdapter.kt", "Name field is null") } ) } } @@ -89,4 +90,4 @@ class AttachmentAdapter @Inject constructor( is Attachment.Contact -> VIEW_TYPE_CONTACT } -} \ No newline at end of file +} diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/compose/part/VCardBinder.kt b/presentation/src/main/java/com/moez/QKSMS/feature/compose/part/VCardBinder.kt index 205437d4e4971f44cf26d4bf535d780150604c36..294f23c79dd16d2447ac4546810a0c34e84a4e57 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/compose/part/VCardBinder.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/compose/part/VCardBinder.kt @@ -19,6 +19,7 @@ package com.moez.QKSMS.feature.compose.part import android.content.Context +import android.util.Log import android.view.Gravity import android.view.View import android.widget.FrameLayout @@ -63,7 +64,7 @@ class VCardBinder @Inject constructor(colors: Colors, private val context: Conte .mapNotNull { inputStream -> inputStream.use { Ezvcard.parse(it).first() } } .subscribeOn(Schedulers.computation()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe { vcard -> view.name?.text = vcard.formattedName.value } + .subscribe( { vcard -> view.name?.text = vcard.formattedName.value }, { throwable -> Log.i("VCardBinder.kt", "Name field is null") } ) val params = view.vCardBackground.layoutParams as FrameLayout.LayoutParams if (!message.isMe()) { @@ -81,4 +82,4 @@ class VCardBinder @Inject constructor(colors: Colors, private val context: Conte } } -} \ No newline at end of file +}