diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-04 10:42:11 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-04 10:42:11 +0100 |
commit | 50d862e5d100eb490658f78e63c6010e42c58aec (patch) | |
tree | 4082e33b599917b109b3e4af5e56bab3423eed19 /settings | |
parent | 6034c9142df375490c4616360e8418a7c6541e00 (diff) | |
download | nextcloud-server-50d862e5d100eb490658f78e63c6010e42c58aec.tar.gz nextcloud-server-50d862e5d100eb490658f78e63c6010e42c58aec.zip |
[Avatars] JS should not load same avatar twice
Old code first dit an ajax request to the avatar. Then a new image
object with the same src was created and since we do not cache avatars
yet :( this resulted in 2 sequential requests to the exact same URL
Now if you set the displayname it will first set the placeholder and
then load the avatar in the background. Only once this time!
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/users.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js index c20a21b060a..aeecac7b243 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -65,8 +65,7 @@ var UserList = { * Avatar or placeholder */ if ($tr.find('div.avatardiv').length){ - $tr.find('.avatardiv').imageplaceholder(user.name, user.displayname); - $('div.avatardiv', $tr).avatar(user.name, 32); + $('div.avatardiv', $tr).avatar(user.name, 32, undefined, undefined, undefined, user.displayname); } /** |