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

Commit 72ca9ff1 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Merge branch 'sprint_istanbul' into 'master'

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

Closes e/management#1015

See merge request e/apps/Message!20
parents d173885e d23a8547
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()) {