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.

settings: Prevent save discard widget override.

Sayam Samal7b45ff50ba25
diff --git a/web/src/settings_components.ts b/web/src/settings_components.ts
index a7687f233a5..fc888e12d7f 100644
--- a/web/src/settings_components.ts
+++ b/web/src/settings_components.ts
@@ -560,6 +560,13 @@ export function change_save_button_state($element: JQuery, state: string): void
return;
}
+ if (state === "succeeded" && $save_button.attr("data-status") === "unsaved") {
+ // We don't show the "saved" state if the save button is in the "unsaved"
+ // state, as that would indicate that user has made some other changes
+ // during the saving process.
+ return;
+ }
+
if (state !== "saving") {
buttons.hide_button_loading_indicator($save_button);
}