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:
Prakhar Pratyush
2024-06-03 12:57:36 +05:30
committed by Tim Abbott
parent 6711f0af09
commit 915503df10
2 changed files with 3 additions and 3 deletions

View File

@@ -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();
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 {
update_notice_to_display(current_user.onboarding_steps);
update_onboarding_steps_to_display(current_user.onboarding_steps);
}

View File

@@ -146,7 +146,7 @@ export function dispatch_normal_event(event) {
break;
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, ...event.onboarding_steps]
: event.onboarding_steps;