Notifications UI

This commit is contained in:
yflory
2019-05-23 11:34:56 +02:00
parent 9cb1a059f2
commit ed868f9c5d
2 changed files with 15 additions and 1 deletions

View File

@@ -971,11 +971,16 @@ MessengerUI, Messages) {
updateUserList(toolbar, config);
var n = $(div).find('.cp-notification').length;
$button.removeClass('fa-bell-o').removeClass('fa-bell');
$n.removeClass('cp-notifications-small');
if (n === 0) {
$empty.show();
$n.hide();
return void $button.addClass('fa-bell-o');
}
if (n > 99) {
n = '99+';
$n.addClass('cp-notifications-small');
}
$empty.hide();
$n.text(n).show();
$button.addClass('fa-bell');