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.

stream_edit: Correctly show loading indicator when unsubscribing user.

Saubhagya Patel4d29f9710875
diff --git a/web/src/stream_edit_subscribers.ts b/web/src/stream_edit_subscribers.ts
index 98cda633cc1..d47dc75ff4f 100644
--- a/web/src/stream_edit_subscribers.ts
+++ b/web/src/stream_edit_subscribers.ts
@@ -402,6 +402,7 @@ function remove_subscriber({
}
function remove_user_from_private_stream(): void {
+ buttons.show_button_loading_indicator($remove_button);
assert(sub !== undefined);
subscriber_api.remove_user_id_from_stream(
target_user_id,
@@ -471,6 +472,7 @@ function remove_subscriber({
return;
}
+ buttons.show_button_loading_indicator($remove_button);
subscriber_api.remove_user_id_from_stream(
target_user_id,
sub,
@@ -568,7 +570,6 @@ export function initialize(): void {
const target_user_id = Number.parseInt($list_entry.attr("data-subscriber-id")!, 10);
const stream_id = current_stream_id;
const $remove_button = $(this).closest(".remove-subscriber-button");
- buttons.show_button_loading_indicator($remove_button);
remove_subscriber({stream_id, target_user_id, $list_entry, $remove_button});
},
);