Use small loading indicator for avatars smaller than 32px

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-07-25 14:26:27 +02:00
parent 6d29b36200
commit 1f635bb892
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 6 additions and 1 deletions

View File

@ -133,7 +133,11 @@
}
};
$div.addClass('icon-loading');
if (size < 32) {
$div.addClass('icon-loading-small');
} else {
$div.addClass('icon-loading');
}
img.width = size;
img.height = size;
img.src = url;

View File

@ -169,5 +169,6 @@
this.css('font-size', '');
this.html('');
this.removeClass('icon-loading');
this.removeClass('icon-loading-small');
};
}(jQuery));