mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
ui_util: Use .show and .hide classes for unread counts visibility.
This is a prep commit for introducing new "Show unread counts for" user display setting. We should use css classes like `.hide` to hide the unread count from the DOM as opposed to using `$unread_count_span.hide()` because this injects inline styles and hence we won't be able to change the `display` style on hovering for unread counts.
This commit is contained in:
@@ -51,12 +51,12 @@ export function update_unread_count_in_dom($unread_count_elem: JQuery, count: nu
|
||||
const $unread_count_span = $unread_count_elem.find(".unread_count");
|
||||
|
||||
if (count === 0) {
|
||||
$unread_count_span.hide();
|
||||
$unread_count_span.addClass("hide");
|
||||
$unread_count_span.text("");
|
||||
return;
|
||||
}
|
||||
|
||||
$unread_count_span.show();
|
||||
$unread_count_span.removeClass("hide");
|
||||
$unread_count_span.text(count);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user