Browse Source

Quick fixes.

pull/92/head
Abhishek 4 years ago
parent
commit
c7e8b907e1
  1. 6
      Clocker/AppDelegate.swift
  2. 2
      Clocker/Overall App/AppDefaults.swift

6
Clocker/AppDelegate.swift

@ -104,7 +104,7 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
} }
@objc func hideFromDock() { @objc func hideFromDock() {
UserDefaults.standard.set(0, forKey: CLAppDislayOptions) UserDefaults.standard.set(0, forKey: CLAppDisplayOptions)
NSApp.setActivationPolicy(.accessory) NSApp.setActivationPolicy(.accessory)
} }
@ -164,10 +164,10 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
let defaults = UserDefaults.standard let defaults = UserDefaults.standard
let currentActivationPolicy = NSRunningApplication.current.activationPolicy let currentActivationPolicy = NSRunningApplication.current.activationPolicy
var activationPolicy: NSApplication.ActivationPolicy = defaults.integer(forKey: CLAppDislayOptions) == 0 ? .accessory : .regular var activationPolicy: NSApplication.ActivationPolicy = defaults.integer(forKey: CLAppDisplayOptions) == 0 ? .accessory : .regular
#if DEBUG #if DEBUG
UserDefaults.standard.set(1, forKey: CLAppDislayOptions) UserDefaults.standard.set(1, forKey: CLAppDisplayOptions)
activationPolicy = .regular activationPolicy = .regular
#endif #endif

2
Clocker/Overall App/AppDefaults.swift

@ -126,7 +126,7 @@ class AppDefaults {
CLShowMeetingInMenubar: 1, CLShowMeetingInMenubar: 1,
CLTruncateTextLength: 30, CLTruncateTextLength: 30,
CLSelectedCalendars: [], CLSelectedCalendars: [],
CLAppDislayOptions: 0, CLAppDisplayOptions: 1,
CLMenubarCompactMode: 1] CLMenubarCompactMode: 1]
} }
} }

Loading…
Cancel
Save