Fix avatar for anonymous users in secure pads

pull/1/head
yflory 7 years ago
parent 00fda0d7d7
commit d9a4a32bf9

@ -214,12 +214,14 @@ define([
var newName = myData.name; var newName = myData.name;
var url = myData.avatar; var url = myData.avatar;
$displayName.text(newName || Messages.anonymous); $displayName.text(newName || Messages.anonymous);
if (accountName) {
$avatar.html(''); $avatar.html('');
UI.displayAvatar(Common, $avatar, url, newName, function ($img) { UI.displayAvatar(Common, $avatar, url, newName, function ($img) {
if ($img) { if ($img) {
$userAdmin.find('button').addClass('avatar'); $userAdmin.find('button').addClass('avatar');
} }
}); });
}
}; };
metadataMgr.onChange(updateButton); metadataMgr.onChange(updateButton);
updateButton(); updateButton();

Loading…
Cancel
Save