Do not request an avatar if there is none

This commit is contained in:
Roeland Jago Douma 2015-12-04 14:35:48 +01:00
parent a619629ac0
commit 8c9a3ccefc
1 changed files with 6 additions and 2 deletions

View File

@ -64,8 +64,12 @@ var UserList = {
/**
* Avatar or placeholder
*/
if ($tr.find('div.avatardiv').length){
$('div.avatardiv', $tr).avatar(user.name, 32, undefined, undefined, undefined, user.displayname);
if ($tr.find('div.avatardiv').length) {
if (user.isAvatarAvailable === true) {
$('div.avatardiv', $tr).avatar(user.name, 32, undefined, undefined, undefined, user.displayname);
} else {
$('div.avatardiv', $tr).imageplaceholder(user.displayname);
}
}
/**