Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d23a8547 authored by Sumit Pundir's avatar Sumit Pundir
Browse files

presentation: handle "vcard.formattedName must not be null" exception

parent d173885e
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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") } )
        }
    }

+3 −2
Original line number Diff line number Diff line
@@ -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()) {