fix welcome shown each time

This commit is contained in:
neon443 committed 2025-11-21 10:58:14 +00:00
1 parent 60cc167be3
commit 92763fc528
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -30,7 +30,7 @@ class EmojiHoarder: ObservableObject {
@Published var letterStats: [EmojiHoarder.LetterStat] = []
@Published var letterStatsSorting: EmojiHoarder.LetterStatSorting = .init(by: .letter, ascending: true)
@Published var showWelcome: Bool = true
@Published var showWelcome: Bool = false
init(localOnly: Bool = false, skipIndex: Bool = false) {
self.showWelcome = !UserDefaults.standard.bool(forKey: "showWelcome")
@@ -205,7 +205,7 @@ class EmojiHoarder: ObservableObject {
}
func setShowWelcome(to newValue: Bool) {
UserDefaults.standard.set(!newValue, forKey: "shownWelcome")
UserDefaults.standard.set(!newValue, forKey: "showWelcome")
self.showWelcome = newValue
}
+1 -1
View File
@@ -49,7 +49,7 @@ struct ContentView: View {
}
}
.sheet(isPresented: $hoarder.showWelcome) {
print("hi")
hoarder.setShowWelcome(to: false)
} content: {
WelcomeView()
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.