mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 00:18:12 +00:00
onboarding_steps: Rename the function 'update_notice_to_display'.
This commit renames the function 'update_notice_to_display' to 'update_onboarding_steps_to_display' as it can be used for onboarding step of any type. Currently, we have only one type i.e. 'one_time_notice'.
This commit is contained in:
committed by
Tim Abbott
parent
6711f0af09
commit
915503df10
@@ -21,7 +21,7 @@ export function post_onboarding_step_as_read(onboarding_step_name: string): void
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update_notice_to_display(onboarding_steps: OnboardingStep[]): void {
|
export function update_onboarding_steps_to_display(onboarding_steps: OnboardingStep[]): void {
|
||||||
ONE_TIME_NOTICES_TO_DISPLAY.clear();
|
ONE_TIME_NOTICES_TO_DISPLAY.clear();
|
||||||
|
|
||||||
for (const onboarding_step of onboarding_steps) {
|
for (const onboarding_step of onboarding_steps) {
|
||||||
@@ -32,5 +32,5 @@ export function update_notice_to_display(onboarding_steps: OnboardingStep[]): vo
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function initialize(): void {
|
export function initialize(): void {
|
||||||
update_notice_to_display(current_user.onboarding_steps);
|
update_onboarding_steps_to_display(current_user.onboarding_steps);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export function dispatch_normal_event(event) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "onboarding_steps":
|
case "onboarding_steps":
|
||||||
onboarding_steps.update_notice_to_display(event.onboarding_steps);
|
onboarding_steps.update_onboarding_steps_to_display(event.onboarding_steps);
|
||||||
current_user.onboarding_steps = current_user.onboarding_steps
|
current_user.onboarding_steps = current_user.onboarding_steps
|
||||||
? [...current_user.onboarding_steps, ...event.onboarding_steps]
|
? [...current_user.onboarding_steps, ...event.onboarding_steps]
|
||||||
: event.onboarding_steps;
|
: event.onboarding_steps;
|
||||||
|
|||||||
Reference in New Issue
Block a user