mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
messages: Simplify API for use_first_unread_anchor.
Now that we have the type situation of having anchor support passing a string, this is a much more natural way to implement use_first_unread_anchor. We still support the old interface to avoid breaking compatibility with legacy versions of the mobile apps.
This commit is contained in:
@@ -162,9 +162,6 @@ exports.load_messages = function (opts) {
|
||||
if (opts.msg_list === home_msg_list && page_params.narrow_stream !== undefined) {
|
||||
data.narrow = JSON.stringify(page_params.narrow);
|
||||
}
|
||||
if (opts.use_first_unread_anchor) {
|
||||
data.use_first_unread_anchor = true;
|
||||
}
|
||||
|
||||
if (opts.num_before > 0) {
|
||||
opts.msg_list.fetch_status.start_older_batch();
|
||||
@@ -226,7 +223,6 @@ exports.load_messages_for_narrow = function (opts) {
|
||||
num_before: consts.narrow_before,
|
||||
num_after: consts.narrow_after,
|
||||
msg_list: msg_list,
|
||||
use_first_unread_anchor: opts.use_first_unread_anchor,
|
||||
pre_scroll_cont: opts.pre_scroll_cont,
|
||||
cont: function () {
|
||||
message_scroll.hide_indicators();
|
||||
|
||||
Reference in New Issue
Block a user