mirror of https://github.com/zulip/zulip.git
unread.js: Add setter for suppress_unread_counts.
After migration to an ES6 module, `suppress_unread_counts` would no longer be mutable from outside the module. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
e24ec31823
commit
9368c33098
|
@ -699,7 +699,7 @@ run_test('insert_unfiltered_user_with_filter', () => {
|
|||
|
||||
run_test('realm_presence_disabled', () => {
|
||||
page_params.realm_presence_disabled = true;
|
||||
unread.suppress_unread_counts = false;
|
||||
unread.set_suppress_unread_counts(false);
|
||||
|
||||
activity.redraw_user();
|
||||
activity.build_user_sidebar();
|
||||
|
|
|
@ -8,6 +8,9 @@ var unread = (function () {
|
|||
var exports = {};
|
||||
|
||||
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;
|
||||
|
|
|
@ -62,7 +62,7 @@ exports.update_unread_counts = function () {
|
|||
};
|
||||
|
||||
exports.enable = function enable() {
|
||||
unread.suppress_unread_counts = false;
|
||||
unread.set_suppress_unread_counts(false);
|
||||
exports.update_unread_counts();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue