Remove image now not coming when user changes fullname. Fixes #17320

This commit is contained in:
patelfenil 2016-03-07 21:20:29 +05:30
parent 19dc02b8e0
commit 5fb96a4630
1 changed files with 9 additions and 2 deletions

View File

@ -107,8 +107,15 @@ function updateAvatar (hidedefault) {
}
$displaydiv.css({'background-color': ''});
$displaydiv.avatar(OC.currentUser, 145, true);
$('#removeavatar').removeClass('hidden').addClass('inlineblock');
$.get(OC.generateUrl(
'/avatar/{user}/{size}',
{user: OC.currentUser, size: 1}
), function (result) {
if (typeof(result) === 'string') {
// Show the delete button when the avatar is custom
$('#removeavatar').removeClass('hidden').addClass('inlineblock');
}
});
}
function showAvatarCropper () {