recent_view: Fix Load more not working after fetching 50k messages.

We do another fetch for `recent_view_fetch_more_batch_size` after
reaching 50k limit each time `Load more` is pressed.
This commit is contained in:
Aman Agrawal
2025-01-07 21:05:16 +05:30
committed by Tim Abbott
parent b2151a333d
commit c2df278f6d

View File

@@ -565,15 +565,18 @@ export function maybe_load_older_messages(opts: {
}
if (fetched_substantial_history && found_first_unread) {
// Once we have fetched enough history, we just do fetches in
// `consts.recent_view_fetch_more_batch_size`.
opts.cont = () => {
recent_view_ui.set_backfill_in_progress(false);
return;
}
};
} else {
opts.cont = () =>
setTimeout(() => {
maybe_load_older_messages(opts);
}, consts.catch_up_backfill_delay);
}
}
do_backfill({
msg_list: opts.msg_list,
msg_list_data: opts.msg_list_data,