fix: apply dock icon preference at launch

This commit is contained in:
Peter Steinberger
2025-12-06 04:04:23 +01:00
parent fbf5333b39
commit b88b18df93

View File

@@ -731,8 +731,8 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSXPCListenerDelegate
@MainActor @MainActor
func applicationDidFinishLaunching(_ notification: Notification) { func applicationDidFinishLaunching(_ notification: Notification) {
NSApp.setActivationPolicy(.accessory)
state = AppStateStore.shared state = AppStateStore.shared
AppActivationPolicy.apply(showDockIcon: state?.showDockIcon ?? false)
LaunchdManager.startClawdis() LaunchdManager.startClawdis()
startListener() startListener()
scheduleFirstRunOnboardingIfNeeded() scheduleFirstRunOnboardingIfNeeded()
@@ -1624,6 +1624,10 @@ struct GeneralSettings: View {
subtitle: "Automatically start Clawdis after you sign in.", subtitle: "Automatically start Clawdis after you sign in.",
binding: $state.launchAtLogin) binding: $state.launchAtLogin)
SettingsToggleRow(title: "Show Dock icon",
subtitle: "Keep Clawdis visible in the Dock instead of menu-bar-only mode.",
binding: $state.showDockIcon)
SettingsToggleRow(title: "Enable debug tools", SettingsToggleRow(title: "Enable debug tools",
subtitle: "Show the Debug tab with development utilities.", subtitle: "Show the Debug tab with development utilities.",
binding: $state.debugPaneEnabled) binding: $state.debugPaneEnabled)