narrow-banner: Pass filter for showing/picking an empty narrow banner.

We expect to have a message list and therefore a filter when we show
or pick an empty narrow banner.
This commit is contained in:
Lauryn Menard
2025-03-04 22:54:20 +01:00
committed by Tim Abbott
parent a98c86922a
commit cb8e67a0e6
5 changed files with 98 additions and 125 deletions

View File

@@ -127,7 +127,7 @@ export function fetch_more_if_required_for_current_msg_list(
if (has_found_oldest && has_found_newest && message_lists.current.visibly_empty()) {
// Even after loading more messages, we have
// no messages to display in this narrow.
narrow_banner.show_empty_narrow_message();
narrow_banner.show_empty_narrow_message(message_lists.current.data.filter);
compose_closed_ui.update_buttons_for_private();
compose_recipient.check_posting_policy_for_compose_box();
}
@@ -433,7 +433,7 @@ export function load_messages(opts: MessageFetchOptions, attempt = 1): void {
!opts.msg_list.is_combined_feed_view &&
opts.msg_list.visibly_empty()
) {
narrow_banner.show_empty_narrow_message();
narrow_banner.show_empty_narrow_message(opts.msg_list.data.filter);
}
// TODO: This should probably do something explicit with