diff options
-rw-r--r-- | package-lock.json | 2 | ||||
-rw-r--r-- | src/components/ContactsList/ContactsListItem.vue | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/package-lock.json b/package-lock.json index 5401247c..3121ddbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2257,7 +2257,7 @@ "dev": true }, "cdav-library": { - "version": "github:nextcloud/cdav-library#3ec4dae028f086fed3e1baa49ec6f6dd04c95043", + "version": "github:nextcloud/cdav-library#e8f29188a90b1ef346882ac0c1b2c39f0cf42f84", "from": "github:nextcloud/cdav-library", "requires": { "@babel/polyfill": "^7.4.0" diff --git a/src/components/ContactsList/ContactsListItem.vue b/src/components/ContactsList/ContactsListItem.vue index 60086c4a..9dca4d44 100644 --- a/src/components/ContactsList/ContactsListItem.vue +++ b/src/components/ContactsList/ContactsListItem.vue @@ -11,7 +11,7 @@ <div :style="{ 'backgroundColor': colorAvatar }" class="app-content-list-item-icon"> {{ contact.displayName | firstLetter }} <!-- try to fetch the avatar only if the contact exists on the server --> - <div v-if="contact.photo && contact.dav" :style="{ 'backgroundImage': avatarUrl }" class="app-content-list-item-icon__avatar" /> + <div v-if="hasPhoto" :style="{ 'backgroundImage': avatarUrl }" class="app-content-list-item-icon__avatar" /> </div> <div class="app-content-list-item-line-one"> {{ contact.displayName }} @@ -59,6 +59,10 @@ export default { return window.btoa(this.contact.key).slice(0, -2) }, + hasPhoto() { + return this.contact.dav && (this.contact.dav.hasphoto || this.contact.photo) + }, + /** * Is this matching the current search ? * |