mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
narrow: Fix incorrect values for use_first_unread_anchor.
Apparently, we were incorrectly passing through something related to opts.use_initial_narrow_pointer as the value for `use_first_anchor`. If you read the logic in narrow.js carefully, use_initial_narrow_pointer was unconditionally false. The correct value for this attribute is when we're trying to narrow to the first unread message in a given context. There are two things to check: * then_select_id is -1; i.e. we don't have a specific message ID we're trying to narrow around. * select_first_unread is True, i.e. we're trying to narrow to the first unread message. A bit more work should allow us to get rid of the second condition, but I'm not quite confident enough to do that yet.
This commit is contained in:
@@ -137,7 +137,7 @@ 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_initial_narrow_pointer,
|
||||
use_first_unread_anchor: opts.use_first_unread_anchor,
|
||||
cont: function (data) {
|
||||
msg_list.fetch_status.finish_initial_narrow({
|
||||
found_oldest: data.found_oldest,
|
||||
|
||||
Reference in New Issue
Block a user