mirror of https://github.com/zulip/zulip.git
unread: Enable the load_server_counts setting for everyone.
This change is long overdue. After implementing this much more robust system and deploying it on chat.zulip.org, we hesitated to make load_server_counts the default behavior in master, because of data anomalies present for many existing users (basically messages far back in their history that they had never read, on streams they believed themselves caught up on), which would have been confusing for many users. However, because the mobile apps have been using this data set for a long time, we've likely cleared out the anomalies from active users' data set. And for older users, they're going to come back to approximately infinite unread messages anyway, so the data anomalies are unlikely to be important. Fixes #7096.
This commit is contained in:
parent
bb746ab93b
commit
500b161aab
|
@ -140,6 +140,7 @@ page_params.subscriptions = [];
|
||||||
page_params.unsubscribed = [];
|
page_params.unsubscribed = [];
|
||||||
page_params.never_subscribed = [];
|
page_params.never_subscribed = [];
|
||||||
page_params.realm_notifications_stream_id = -1;
|
page_params.realm_notifications_stream_id = -1;
|
||||||
|
page_params.unread_msgs = {};
|
||||||
|
|
||||||
$('#tab_bar').append = () => {};
|
$('#tab_bar').append = () => {};
|
||||||
$('#compose').filedrop = () => {};
|
$('#compose').filedrop = () => {};
|
||||||
|
|
|
@ -6,9 +6,6 @@ zrequire('unread');
|
||||||
|
|
||||||
set_global('blueslip', {});
|
set_global('blueslip', {});
|
||||||
set_global('page_params', {});
|
set_global('page_params', {});
|
||||||
set_global('feature_flags', {
|
|
||||||
load_server_counts: true,
|
|
||||||
});
|
|
||||||
set_global('narrow_state', {});
|
set_global('narrow_state', {});
|
||||||
set_global('current_msg_list', {});
|
set_global('current_msg_list', {});
|
||||||
set_global('home_msg_list', {});
|
set_global('home_msg_list', {});
|
||||||
|
|
|
@ -2,8 +2,6 @@ var feature_flags = (function () {
|
||||||
|
|
||||||
var exports = {};
|
var exports = {};
|
||||||
|
|
||||||
exports.load_server_counts = false;
|
|
||||||
|
|
||||||
// The features below have all settled into their final states and can
|
// The features below have all settled into their final states and can
|
||||||
// be removed when we get a chance
|
// be removed when we get a chance
|
||||||
exports.propagate_topic_edits = true;
|
exports.propagate_topic_edits = true;
|
||||||
|
|
|
@ -602,7 +602,7 @@ exports.get_msg_ids_for_starred = function () {
|
||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.load_server_counts = function () {
|
exports.initialize = function () {
|
||||||
var unread_msgs = page_params.unread_msgs;
|
var unread_msgs = page_params.unread_msgs;
|
||||||
|
|
||||||
exports.unread_pm_counter.set_huddles(unread_msgs.huddles);
|
exports.unread_pm_counter.set_huddles(unread_msgs.huddles);
|
||||||
|
@ -622,12 +622,6 @@ exports.load_server_counts = function () {
|
||||||
unread_messages.add_many(unread_msgs.mentions);
|
unread_messages.add_many(unread_msgs.mentions);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.initialize = function () {
|
|
||||||
if (feature_flags.load_server_counts) {
|
|
||||||
exports.load_server_counts();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}());
|
}());
|
||||||
if (typeof module !== 'undefined') {
|
if (typeof module !== 'undefined') {
|
||||||
|
|
Loading…
Reference in New Issue