message_fetch: Pass msg_list to load_messages_for_narrow.

This tweak makes the code easier to reason about and may also help
generalize the codebase to support maintaining multiple message lists.
This commit is contained in:
Tim Abbott
2022-12-09 11:33:10 -08:00
committed by Aman Agrawal
parent a972804de3
commit 5f4faaf22c
3 changed files with 4 additions and 3 deletions

View File

@@ -292,13 +292,11 @@ export function load_messages(opts, attempt = 1) {
}
export function load_messages_for_narrow(opts) {
const msg_list = message_list.narrowed;
load_messages({
anchor: opts.anchor,
num_before: consts.narrow_before,
num_after: consts.narrow_after,
msg_list,
msg_list: opts.msg_list,
cont: opts.cont,
});
}