Skip to content

Commit

Permalink
Enable capability-based avatar img loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed May 31, 2021
1 parent 3ac2db7 commit dccce3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Use profile picture capability in avatars

Requests for loading avatar profile pictures now only get sent
if the backend communicates their availability in the capabilities.

https://github.com/owncloud/web/pull/5178
5 changes: 3 additions & 2 deletions packages/web-runtime/src/components/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ export default {
}
},
computed: {
...mapGetters(['getToken', 'configuration']),
...mapGetters(['getToken', ['capabilities', 'configuration']]),
enabled: function() {
return this.configuration.enableAvatars || true
return this.capabilities.file_sharing.user.profile_picture
}
},
watch: {
Expand Down

0 comments on commit dccce3e

Please sign in to comment.