diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.js index bdf92ea802..75592f0969 100644 --- a/frontend_tests/node_tests/activity.js +++ b/frontend_tests/node_tests/activity.js @@ -678,7 +678,6 @@ run_test('insert_unfiltered_user_with_filter', () => { run_test('realm_presence_disabled', () => { page_params.realm_presence_disabled = true; - unread.set_suppress_unread_counts(false); activity.redraw_user(); activity.build_user_sidebar(); diff --git a/static/js/buddy_data.js b/static/js/buddy_data.js index 20a2da2c98..6411e7cef8 100644 --- a/static/js/buddy_data.js +++ b/static/js/buddy_data.js @@ -134,9 +134,6 @@ exports.matches_filter = function (filter_text, user_id) { }; function get_num_unread(user_id) { - if (unread.suppress_unread_counts) { - return 0; - } return unread.num_unread_for_person(user_id.toString()); } diff --git a/static/js/panels.js b/static/js/panels.js index 7d2a262970..422cfcdae1 100644 --- a/static/js/panels.js +++ b/static/js/panels.js @@ -94,10 +94,6 @@ exports.initialize = function () { resize_app(); }); - $("#bankruptcy").on("hide", function () { - unread_ui.enable(); - }); - $("#panels").on("click", ".alert .close, .alert .exit", function (e) { e.stopPropagation(); const $process = $(e.target).closest("[data-process]"); diff --git a/static/js/unread.js b/static/js/unread.js index feda283a4b..be9d276fc7 100644 --- a/static/js/unread.js +++ b/static/js/unread.js @@ -13,10 +13,6 @@ const FoldDict = require('./fold_dict').FoldDict; // See https://zulip.readthedocs.io/en/latest/subsystems/pointer.html // for more details on how this system is designed. -exports.suppress_unread_counts = true; -exports.set_suppress_unread_counts = function (value) { - exports.suppress_unread_counts = value; -}; exports.messages_read_in_narrow = false; exports.set_messages_read_in_narrow = function (value) { exports.messages_read_in_narrow = value; diff --git a/static/js/unread_ui.js b/static/js/unread_ui.js index d26ed78fcc..ab575c497a 100644 --- a/static/js/unread_ui.js +++ b/static/js/unread_ui.js @@ -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;