Skip to content

Commit

Permalink
Merge pull request #1021 from nextcloud/enhancement/dav/load-photo-on…
Browse files Browse the repository at this point in the history
…-list

Use dav hasPhoto to properly load photos into the list
  • Loading branch information
skjnldsv authored Mar 27, 2019
2 parents 2736326 + 5b21689 commit 2239568
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/components/ContactsList/ContactsListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 ?
*
Expand Down

0 comments on commit 2239568

Please sign in to comment.