mirror of https://github.com/zulip/zulip.git
Fix corner case with recent narrowing optimization.
For a commit that was just merged I had the "back-out" case at the wrong nesting level. It was a pretty obscure failure scenario that never came up in practice, but basically if you were starting at a message that was not in your narrow, but we did have some messages in your narrow, we would try to go near the old message instead of talking to the server to find the next unread message in that narrow.
This commit is contained in:
parent
4573bdd005
commit
0463bb2c5e
|
@ -321,15 +321,14 @@ exports.maybe_add_local_messages = function (opts) {
|
||||||
if (load_local_messages()) {
|
if (load_local_messages()) {
|
||||||
return select_strategy;
|
return select_strategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Back out to first_unread strategy since we can't find
|
|
||||||
// any messages.
|
|
||||||
select_strategy = {
|
|
||||||
flavor: 'first_unread',
|
|
||||||
};
|
|
||||||
return select_strategy;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Back out to first_unread strategy since we can't find
|
||||||
|
// any messages.
|
||||||
|
select_strategy = {
|
||||||
|
flavor: 'first_unread',
|
||||||
|
};
|
||||||
|
return select_strategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We may still be in our original select_strategy.
|
// We may still be in our original select_strategy.
|
||||||
|
|
Loading…
Reference in New Issue