From 3e6e959b19fe06d3ec75d95df3aec2626865255e Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 3 Jul 2025 19:16:42 +0800 Subject: [PATCH] Call onboarding dialog only once - Removed earlier call to onboarding dialog, choosing to call it only at the end to make way for any error notifications --- src/views/HomeView.vue | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 49919da9..53c43551 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -478,6 +478,7 @@ export default class HomeView extends Vue { selectedImageData: Blob | null = null; isImageViewerOpen = false; imageCache: Map = new Map(); + needsOnboarding = false; /** * Initializes the component on mount @@ -603,12 +604,8 @@ export default class HomeView extends Vue { this.showShortcutBvc = !!settings.showShortcutBvc; this.isAnyFeedFilterOn = checkIsAnyFeedFilterOn(settings); - // Check onboarding status - if (!settings.finishedOnboarding) { - (this.$refs.onboardingDialog as OnboardingDialog).open( - OnboardPage.Home, - ); - } + // Check onboarding status - will be handled in checkOnboarding() + this.needsOnboarding = !settings.finishedOnboarding; // Check registration status if needed if (!this.isRegistered && this.activeDid) { @@ -841,11 +838,16 @@ export default class HomeView extends Vue { * Called by mounted() */ private async checkOnboarding() { - let settings = await databaseUtil.retrieveSettingsForActiveAccount(); - if (USE_DEXIE_DB) { - settings = await retrieveSettingsForActiveAccount(); + // Only check if we haven't already determined onboarding is needed + if (!this.needsOnboarding) { + let settings = await databaseUtil.retrieveSettingsForActiveAccount(); + if (USE_DEXIE_DB) { + settings = await retrieveSettingsForActiveAccount(); + } + this.needsOnboarding = !settings.finishedOnboarding; } - if (!settings.finishedOnboarding) { + + if (this.needsOnboarding) { (this.$refs.onboardingDialog as OnboardingDialog).open(OnboardPage.Home); } }