diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-03-27 12:52:39 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-03-27 12:52:39 +0100 |
commit | 5b21689a447b21c131ca544ed235f592ab2841ac (patch) | |
tree | d63a23655f14d7c53079e837f891d8927b598a5b /src | |
parent | 273632613aa8a99f1dafb21820fe5c60550a0edc (diff) |
Use dav hasPhoto to properly load photos into the list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ContactsList/ContactsListItem.vue | 6 |
1 files changed, 5 insertions, 1 deletions
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 ? * |