mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
unread: Remove suppress_unread_counts flag.
This flag was used to delay unread count updates while the bankruptcy modal was visible. Now that bankrupcty is no longer a modal, we don't need this flag at all.
This commit is contained in:
@@ -35,10 +35,6 @@ exports.set_count_toggle_button = function (elem, count) {
|
||||
};
|
||||
|
||||
exports.update_unread_counts = function () {
|
||||
if (unread.suppress_unread_counts) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Pure computation:
|
||||
const res = unread.get_counts();
|
||||
|
||||
@@ -59,11 +55,6 @@ exports.update_unread_counts = function () {
|
||||
|
||||
};
|
||||
|
||||
exports.enable = function enable() {
|
||||
unread.set_suppress_unread_counts(false);
|
||||
exports.update_unread_counts();
|
||||
};
|
||||
|
||||
exports.should_display_bankruptcy_banner = function () {
|
||||
// Until we've handled possibly declaring bankruptcy, don't show
|
||||
// unread counts since they only consider messages that are loaded
|
||||
@@ -72,7 +63,6 @@ exports.should_display_bankruptcy_banner = function () {
|
||||
|
||||
if (!page_params.furthest_read_time) {
|
||||
// We've never read a message.
|
||||
exports.enable();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -82,12 +72,11 @@ exports.should_display_bankruptcy_banner = function () {
|
||||
return true;
|
||||
}
|
||||
|
||||
exports.enable();
|
||||
return false;
|
||||
};
|
||||
|
||||
exports.initialize = function () {
|
||||
exports.enable();
|
||||
exports.update_unread_counts();
|
||||
};
|
||||
|
||||
window.unread_ui = exports;
|
||||
|
||||
Reference in New Issue
Block a user