From 036afbf5b8cc0d5034f01a6eb973ce71badba262 Mon Sep 17 00:00:00 2001 From: ericholguin Date: Fri, 24 Oct 2025 16:50:43 -0600 Subject: [PATCH] fix: Don't show onboarding when logged in with npub This PR makes sure to not show the onboarding screens when a user is logged in with an npub as it doesn't make sense for them to see that. Changelog-Fixes: Fixes issue where onboarding views are shown to npub users Signed-off-by: ericholguin --- damus/ContentView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index dee644ac..6ea9af53 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -306,8 +306,10 @@ struct ContentView: View { try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default, options: .mixWithOthers) setup_notifications() if !hasSeenOnboardingSuggestions || damus_state!.settings.always_show_onboarding_suggestions { - active_sheet = .onboardingSuggestions - hasSeenOnboardingSuggestions = true + if damus_state.is_privkey_user { + active_sheet = .onboardingSuggestions + hasSeenOnboardingSuggestions = true + } } self.appDelegate?.state = damus_state Task { // We probably don't need this to be a detached task. According to https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/#Defining-and-Calling-Asynchronous-Functions, awaits are only suspension points that do not block the thread.