compose: Add option to specify container for appending banners.

This commit is contained in:
Daniil Fadeev 2023-05-01 18:47:00 +07:00 committed by Tim Abbott
parent d96fac2b59
commit 3b35307c20
1 changed files with 6 additions and 2 deletions

View File

@ -51,10 +51,14 @@ export const CLASSNAMES = {
user_not_subscribed: "user_not_subscribed",
};
// This function provides a convenient way to add new elements
// to a banner container. The function accepts a container element
// as a parameter, to which a banner should be appended.
export function append_compose_banner_to_banner_list(
new_row: HTMLElement | JQuery.htmlString,
banner: HTMLElement | JQuery.htmlString,
$list_container: JQuery,
): void {
scroll_util.get_content_element($("#compose_banners")).append(new_row);
scroll_util.get_content_element($list_container).append(banner);
}
export function clear_message_sent_banners(include_unmute_banner = true): void {