Browse Source

Minor cosmetic changes.

pull/92/head
Abhishek 5 years ago
parent
commit
4c9191d150
  1. 2
      Clocker/Menu Bar/MenubarHandler.swift
  2. 4
      Clocker/Overall App/DataStore.swift
  3. 5
      Clocker/Panel/ParentPanelController.swift

2
Clocker/Menu Bar/MenubarHandler.swift

@ -9,7 +9,7 @@ class MenubarHandler: NSObject {
return nextEvent return nextEvent
} }
guard let menubarTitles = DataStore.shared().retrieve(key: CLMenubarFavorites) as? [Data] else { guard let menubarTitles = DataStore.shared().menubarTimezones() else {
return nil return nil
} }

4
Clocker/Overall App/DataStore.swift

@ -44,6 +44,10 @@ class DataStore: NSObject {
return preferences return preferences
} }
func menubarTimezones() -> [Data]? {
return DataStore.shared().retrieve(key: CLMenubarFavorites) as? [Data]
}
func updateDayPreference() { func updateDayPreference() {
shouldDisplayDayInMenubar = shouldDisplay(.dayInMenubar) shouldDisplayDayInMenubar = shouldDisplay(.dayInMenubar)
} }

5
Clocker/Panel/ParentPanelController.swift

@ -221,6 +221,11 @@ class ParentPanelController: NSWindowController {
} }
DataStore.shared().setTimezones(datas) DataStore.shared().setTimezones(datas)
// Update appereance if in compact menubar mode
if let appDelegate = NSApplication.shared.delegate as? AppDelegate {
appDelegate.setupMenubarTimer()
}
} }
func determineUpcomingViewVisibility() { func determineUpcomingViewVisibility() {

Loading…
Cancel
Save