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

@@ -49,7 +49,9 @@ export function initialize(): void {
const button_type = $elem.attr("data-reply-button-type");
switch (button_type) {
case "direct_disabled": {
instance.setContent(pick_empty_narrow_banner().title);
const narrow_filter = narrow_state.filter();
assert(narrow_filter !== undefined);
instance.setContent(pick_empty_narrow_banner(narrow_filter).title);
return;
}
case "stream_disabled": {