unreads: Remove is_reading_mode().

This was a part of an experiment we ran on chat.zulip.org in Jul 2018
and surrounding code that used it never got merged to master.

See: https://chat.zulip.org/#narrow/stream/2-general/topic/un-narrow.20view/near/609506
and c407ba5175.
This commit is contained in:
Rohitt Vashishtha
2020-01-11 21:42:29 +05:30
committed by Tim Abbott
parent 7f45ca9b22
commit 04bb26be3a
3 changed files with 0 additions and 33 deletions

View File

@@ -494,25 +494,6 @@ Filter.prototype = {
return _.isEqual(term_types, wanted_term_types);
},
is_reading_mode: function () {
// We only turn on "reading mode" for filters that
// have contiguous messages for a narrow, as opposed
// to "random access" queries like search:<keyword>
// or id:<number> that jump you to parts of the message
// view where you might only care about reading the
// current message.
const term_types = this.sorted_term_types();
const wanted_list = [
['stream'],
['stream', 'topic'],
['is-private'],
['pm-with'],
];
return _.any(wanted_list, function (wanted_types) {
return _.isEqual(wanted_types, term_types);
});
},
can_bucket_by: function () {
// TODO: in ES6 use spread operator
//