compose_banner: Clear convert_pasted_text_to_file_banner correctly.

This is a follow-up to #35476 where we made a change in
`compose.clear_compose_box` to clear this banner.
In this commit, we instead club the clearing logic together
with `compose_banner.clear_uploads`.
This commit is contained in:
Kislay Verma
2025-09-24 09:26:01 +05:30
committed by Tim Abbott
parent aa0051abc2
commit 951fd388fb
2 changed files with 1 additions and 5 deletions

View File

@@ -97,7 +97,6 @@ export function clear_compose_box() {
compose_banner.clear_errors();
compose_banner.clear_warnings();
compose_banner.clear_uploads();
compose_banner.clear_convert_pasted_text_to_file_banner();
compose_ui.hide_compose_spinner();
scheduled_messages.reset_selected_schedule_timestamp();
$(".needs-empty-compose").removeClass("disabled-on-hover");

View File

@@ -149,6 +149,7 @@ export function clear_warnings(): void {
export function clear_uploads(): void {
$("#compose_banners .upload_banner").remove();
$(`#compose_banners .${CSS.escape(CLASSNAMES.convert_pasted_text_to_file)}`).remove();
}
export function clear_unmute_topic_notifications(): void {
@@ -172,10 +173,6 @@ export function clear_interleaved_view_messages_fading_banner(): void {
$(`#compose_banners .${CSS.escape(CLASSNAMES.interleaved_view_messages_fading)}`).remove();
}
export function clear_convert_pasted_text_to_file_banner(): void {
$(`#compose_banners .${CSS.escape(CLASSNAMES.convert_pasted_text_to_file)}`).remove();
}
export function clear_all(): void {
scroll_util.get_content_element($(`#compose_banners`)).empty();
}