diff --git a/Clocker/Overall App/DataStore.swift b/Clocker/Overall App/DataStore.swift index 6041b8c..ca491f1 100644 --- a/Clocker/Overall App/DataStore.swift +++ b/Clocker/Overall App/DataStore.swift @@ -165,7 +165,7 @@ class DataStore: NSObject { guard let value = retrieve(key: CLDisplayFutureSliderKey) as? NSNumber else { return false } - return value != 2 // Modern is 0, Legacy is 1 and Hide is 2. + return value != 1 // Display slider is 0 and Hide is 1. case .upcomingEventView: guard let value = retrieve(key: CLShowUpcomingEventView) as? NSString else { return false diff --git a/Clocker/Panel/PanelController.swift b/Clocker/Panel/PanelController.swift index c86811d..f34c64c 100644 --- a/Clocker/Panel/PanelController.swift +++ b/Clocker/Panel/PanelController.swift @@ -76,16 +76,16 @@ class PanelController: ParentPanelController { updateDefaultPreferences() setupUpcomingEventViewCollectionViewIfNeccesary() + + //TODO: Always hide the legacy slider. Delete this once v24.01 stabilizes. + futureSliderView.isHidden = true if DataStore.shared().timezones().isEmpty || DataStore.shared().shouldDisplay(.futureSlider) == false { - futureSliderView.isHidden = true modernContainerView.isHidden = true } else if let value = DataStore.shared().retrieve(key: CLDisplayFutureSliderKey) as? NSNumber, modernContainerView != nil { if value.intValue == 1 { - futureSliderView.isHidden = false modernContainerView.isHidden = true } else if value.intValue == 0 { - futureSliderView.isHidden = true modernContainerView.isHidden = false } } diff --git a/Clocker/Panel/ParentPanelController.swift b/Clocker/Panel/ParentPanelController.swift index ca6d151..6d8e20a 100644 --- a/Clocker/Panel/ParentPanelController.swift +++ b/Clocker/Panel/ParentPanelController.swift @@ -111,20 +111,15 @@ class ParentPanelController: NSWindowController { futureSliderObserver = UserDefaults.standard.observe(\.displayFutureSlider, options: [.new]) { _, change in if let changedValue = change.newValue { if changedValue == 0 { - self.futureSliderView.isHidden = true if self.modernContainerView != nil { self.modernContainerView.isHidden = false } } else if changedValue == 1 { - self.futureSliderView.isHidden = false - if self.modernContainerView != nil { self.modernContainerView.isHidden = true } } else { - self.futureSliderView.isHidden = true - if self.modernContainerView != nil { self.modernContainerView.isHidden = true } @@ -213,21 +208,22 @@ class ParentPanelController: NSWindowController { // Setup colors based on the curren theme themeChanged() + + //TODO: Always hide the legacy slider view. Delete this once v24.01 stabilizes. + futureSliderView.isHidden = true // UI adjustments based on user preferences if DataStore.shared().timezones().isEmpty || DataStore.shared().shouldDisplay(.futureSlider) == false { - futureSliderView.isHidden = true + if modernContainerView != nil { modernContainerView.isHidden = true } } else if let value = DataStore.shared().retrieve(key: CLDisplayFutureSliderKey) as? NSNumber { if value.intValue == 1 { - futureSliderView.isHidden = false if modernContainerView != nil { modernContainerView.isHidden = true } } else if value.intValue == 0 { - futureSliderView.isHidden = true // Floating Window doesn't support modern slider yet! if modernContainerView != nil { modernContainerView.isHidden = false diff --git a/Clocker/Preferences/Appearance/AppearanceViewController.swift b/Clocker/Preferences/Appearance/AppearanceViewController.swift index 002c6be..027afd3 100644 --- a/Clocker/Preferences/Appearance/AppearanceViewController.swift +++ b/Clocker/Preferences/Appearance/AppearanceViewController.swift @@ -296,7 +296,6 @@ class AppearanceViewController: ParentViewController { panelController.futureSlider.setNeedsDisplay(futureSliderBounds) panelController.updateDefaultPreferences() - panelController.updateTableContent() panelController.setupMenubarTimer() } diff --git a/Clocker/Preferences/Preferences.storyboard b/Clocker/Preferences/Preferences.storyboard index 2946339..cdda4c8 100644 --- a/Clocker/Preferences/Preferences.storyboard +++ b/Clocker/Preferences/Preferences.storyboard @@ -1,8 +1,8 @@ - + - + @@ -66,7 +66,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -100,14 +100,14 @@ - + @@ -496,7 +496,7 @@