Browse Source

Some cleanup.

pull/92/head
Abhishek 5 years ago
parent
commit
ba5cfe3194
  1. 3
      Clocker/Menu Bar/StatusItemHandler.swift
  2. 4
      Clocker/Preferences/General/SearchDataSource.swift

3
Clocker/Menu Bar/StatusItemHandler.swift

@ -35,6 +35,9 @@ class StatusItemHandler: NSObject {
// TODO: Make sure it's set just once. // TODO: Make sure it's set just once.
private var currentState: MenubarState = .standardText { private var currentState: MenubarState = .standardText {
didSet { didSet {
if oldValue == currentState {
assert(oldValue == currentState, "We have the same status bar state")
}
// Do some cleanup // Do some cleanup
switch oldValue { switch oldValue {
case .compactText: case .compactText:

4
Clocker/Preferences/General/SearchDataSource.swift

@ -34,7 +34,7 @@ class SearchDataSource: NSObject {
super.init() super.init()
self.searchField = searchField self.searchField = searchField
setupTimezoneDatasource() setupTimezoneDatasource()
_ = calculateChangesets() calculateChangesets()
} }
func cleanupFilterArray() { func cleanupFilterArray() {
@ -78,7 +78,7 @@ class SearchDataSource: NSObject {
} }
} }
func calculateChangesets() -> Bool { @discardableResult func calculateChangesets() -> Bool {
var changesets: [RowType] = [] var changesets: [RowType] = []
func addTimezonesIfNeeded(_ data: [TimezoneMetadata]) { func addTimezonesIfNeeded(_ data: [TimezoneMetadata]) {

Loading…
Cancel
Save