New Menubar icon, show welcome screen only on first launch

This commit is contained in:
Leon Böttger committed 2025-01-04 19:59:11 +01:00
1 parent 90bfcda2f8
commit 6da986a974
9 files changed
+34 -17

No files matched your search

+8 -1
View File
@@ -62,7 +62,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
NearbyConnectionManager.shared.mainAppDelegate=self
NearbyConnectionManager.shared.becomeVisible()
openWelcomeScreen()
if !UserDefaults.standard.bool(forKey: "ShowedWelcomeScreen"){
openWelcomeScreen()
UserDefaults.standard.set(true, forKey: "ShowedWelcomeScreen")
}
}
@@ -81,6 +84,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
window?.isReleasedWhenClosed = false
window?.setFrameAutosaveName("WelcomeScreen")
window?.contentView = NSHostingView(rootView: welcomeView)
// Ensure the window is always on top
window?.level = .floating
window?.makeKeyAndOrderFront(nil)
}