recent_topics: Show loading indicator before fetching initial messages.

Hide the loading indicator after initial fetch for recent topics.
This commit is contained in:
Aman Agrawal
2022-02-25 05:08:08 +00:00
committed by Tim Abbott
parent 98c2038718
commit 5ae178b39c
7 changed files with 66 additions and 13 deletions

View File

@@ -500,10 +500,16 @@ export function initialize(home_view_loaded) {
filter: new Filter([{operator: "in", operand: "home"}]),
excludes_muted_topics: true,
});
// TODO: Ideally we'd have loading indicators for recent topics at
// both top and bottom be managed by load_messages, but that
// likely depends on other reorganizations of the early loading
// sequence.
recent_topics_ui.show_loading_indicator();
load_messages({
anchor: "newest",
num_before: consts.recent_topics_initial_fetch_size,
num_after: 0,
msg_list: recent_topics_message_list,
cont: recent_topics_ui.hide_loading_indicator,
});
}