Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bitfireAT/vcard4android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicki Hirner <hirner@bitfire.at>2022-03-21 00:50:36 +0300
committerRicki Hirner <hirner@bitfire.at>2022-03-21 00:50:36 +0300
commit5b58f24b762739ae10e534620ad8681a549f2c2f (patch)
treea9f4b9f13570222ccf8ae1a43a5212b65918a8d6
parentc410b0737809da2488aa2f9c6f4d10ec4675f4a5 (diff)
vCard parsing: use first working photo
-rw-r--r--src/main/java/at/bitfire/vcard4android/ContactReader.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/at/bitfire/vcard4android/ContactReader.kt b/src/main/java/at/bitfire/vcard4android/ContactReader.kt
index 14355ef..d41c4dd 100644
--- a/src/main/java/at/bitfire/vcard4android/ContactReader.kt
+++ b/src/main/java/at/bitfire/vcard4android/ContactReader.kt
@@ -11,7 +11,6 @@ import ezvcard.VCard
import ezvcard.parameter.RelatedType
import ezvcard.property.*
import ezvcard.util.PartialDate
-import org.apache.commons.lang3.ObjectUtils
import org.apache.commons.lang3.StringUtils
import java.net.URI
import java.net.URISyntaxException
@@ -238,7 +237,7 @@ class ContactReader internal constructor(val vCard: VCard, val downloader: Conta
}
is Photo ->
- c.photo = getPhotoBytes(prop)
+ c.photo = c.photo ?: getPhotoBytes(prop)
// drop large binary properties because of potential OutOfMemory / TransactionTooLarge exceptions
is Logo -> {