File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ struct ContentView: View {
4141 selectedContextID: $selectedContextID
4242 )
4343 . onAppear {
44+ if ProcessInfo . processInfo. arguments. contains ( " -NSApplicationIsLoginItem " ) {
45+ if let window = NSApp . windows. first {
46+ window. orderOut ( nil )
47+ NSApp . setActivationPolicy ( . accessory)
48+ }
49+ }
4450 if selectedContextID == nil , let first = contextManager. contexts. first {
4551 selectedContextID = first. id
4652 }
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ struct SettingsView: View {
99 Toggle ( isOn: $startAtLogin) {
1010 Text ( " Start Flitro at login " )
1111 }
12- . onChange ( of: startAtLogin) { value in
13- setLaunchAtLogin ( enabled: value )
12+ . onChange ( of: startAtLogin) {
13+ setLaunchAtLogin ( enabled: startAtLogin )
1414 }
1515 }
1616 . padding ( )
You can’t perform that action at this time.
0 commit comments