Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-12-04 12:42:11 +0300
committerRoeland Jago Douma <rullzer@owncloud.com>2015-12-04 12:42:11 +0300
commit50d862e5d100eb490658f78e63c6010e42c58aec (patch)
tree4082e33b599917b109b3e4af5e56bab3423eed19 /settings/js
parent6034c9142df375490c4616360e8418a7c6541e00 (diff)
[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/js')
-rw-r--r--settings/js/users/users.js3
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);
}
/**