settings: Fix the sticky behavior of saving indicator.

We want the saving indicator to be sticky in the cases
where we ask user to reload after changing settings.
This used to work correctly before 9e08c6db93, as
'if(remove_after)' returned false if remove_after was
null, but the condition was changed in 9e08c6db93
to 'if(remove_after !== undefined)' and thus the
condition returned true when remove_after was null.
This commit change the remove_after value to undefined
for sticky cases.
This commit is contained in:
Sahil Batra
2021-09-15 00:28:05 +05:30
committed by Tim Abbott
parent 8c72959951
commit 6e169be933

View File

@@ -37,7 +37,7 @@ export function do_settings_change(
const spinner = $(status_element).expectOne();
spinner.fadeTo(0, 1);
loading.make_indicator(spinner, {text: strings.saving});
const remove_after = sticky ? null : 1000;
const remove_after = sticky ? undefined : 1000;
const appear_after = 500;
request_method({