fix(onboarding): suppress persistence snack during initial preset selection

isOnboardingInProgress() only covered the phase after preset selection.
Fresh users on the preset selection screen still saw the snack because
ONBOARDING_PRESET_DONE was not yet set. Extend the check to also return
true when neither preset nor skip-tour flags are set.
This commit is contained in:
Johannes Millan 2026-03-26 11:50:16 +01:00
parent 25051d2899
commit 26c884935f

View file

@ -59,10 +59,16 @@ export class OnboardingHintService {
}
static isOnboardingInProgress(): boolean {
return (
!!localStorage.getItem(LS.ONBOARDING_PRESET_DONE) &&
!localStorage.getItem(LS.ONBOARDING_HINTS_DONE)
);
// Onboarding is fully completed
if (localStorage.getItem(LS.ONBOARDING_HINTS_DONE)) {
return false;
}
// Already past preset selection, hints still pending
if (localStorage.getItem(LS.ONBOARDING_PRESET_DONE)) {
return true;
}
// Fresh user still on preset selection screen (no preset done, no skip tour)
return !localStorage.getItem(LS.IS_SKIP_TOUR);
}
startAfterPresetSelection(): void {