Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Modified compose logic to hide warning banners.

Maneesh Shuklaa01de323a5e9
diff --git a/web/src/compose_banner.ts b/web/src/compose_banner.ts
index f92f443f0d8..f07be80424c 100644
--- a/web/src/compose_banner.ts
+++ b/web/src/compose_banner.ts
@@ -76,6 +76,9 @@ export function append_compose_banner_to_banner_list(
$banner: JQuery,
$list_container: JQuery,
): boolean {
+ if ($banner.hasClass("warning") && has_error()) {
+ return false;
+ }
scroll_util.get_content_element($list_container).append($banner);
return true;
}
@@ -252,3 +255,7 @@ export function show_stream_not_subscribed_error(sub: StreamSubscription): void
});
append_compose_banner_to_banner_list($(new_row_html), $banner_container);
}
+
+export function has_error(): boolean {
+ return $("#compose_banners .error:visible").length > 0;
+}