forked from upstream-mirrors/quik
fix crashing bug attaching contact card
This commit is contained in:
@@ -73,8 +73,6 @@ class AttachmentAdapter @Inject constructor(
|
|||||||
override fun onBindViewHolder(holder: QkViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: QkViewHolder, position: Int) {
|
||||||
val attachment = getItem(position)
|
val attachment = getItem(position)
|
||||||
|
|
||||||
holder.fileName.visibility = View.GONE
|
|
||||||
|
|
||||||
if (attachment.isVCard(context)) {
|
if (attachment.isVCard(context)) {
|
||||||
val displayName = Ezvcard.parse(
|
val displayName = Ezvcard.parse(
|
||||||
String(attachment.getResourceBytes(context))
|
String(attachment.getResourceBytes(context))
|
||||||
@@ -84,6 +82,8 @@ class AttachmentAdapter @Inject constructor(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
holder.fileName.visibility = View.GONE
|
||||||
|
|
||||||
// if attachment uri is missing
|
// if attachment uri is missing
|
||||||
if (!attachment.getUri().resourceExists(context)) {
|
if (!attachment.getUri().resourceExists(context)) {
|
||||||
holder.thumbnail.setImageResource(android.R.drawable.ic_delete)
|
holder.thumbnail.setImageResource(android.R.drawable.ic_delete)
|
||||||
|
|||||||
Reference in New Issue
Block a user