mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
compose_banner: Add update_or_append_banner method in compose_banner.
`update_or_append_banner` abstracts the logic for not creating another compose banner if one is already present in the DOM, it just replaces the content of the old banner with the new one.
This commit is contained in:
@@ -262,7 +262,11 @@ function show_wildcard_warnings(opts) {
|
||||
);
|
||||
} else {
|
||||
// if there is already a banner, replace it with the new one
|
||||
opts.$banner_container.find(`.${CSS.escape(classname)}`).replaceWith(wildcard_template);
|
||||
compose_banner.update_or_append_banner(
|
||||
wildcard_template,
|
||||
classname,
|
||||
opts.$banner_container,
|
||||
);
|
||||
}
|
||||
|
||||
user_acknowledged_wildcard = false;
|
||||
|
||||
Reference in New Issue
Block a user