Browse Source

Remove condition causing infinite looping in unit tests

pull/113/head
Abhishek 3 years ago
parent
commit
6583efdf1d
  1. 7
      Clocker/Overall App/Themer.swift

7
Clocker/Overall App/Themer.swift

@ -50,14 +50,11 @@ class Themer: NSObject {
object: nil)
if #available(macOS 10.14, *) {
effectiveApperanceObserver = NSApp.observe(\.effectiveAppearance) { [weak self] _, _ in
if let sSelf = self {
sSelf.setAppAppearance()
effectiveApperanceObserver = NSApp.observe(\.effectiveAppearance) { _, _ in
NotificationCenter.default.post(name: .themeDidChangeNotification, object: nil)
}
}
}
}
}
extension Themer {
@ -452,9 +449,11 @@ extension Themer {
} else if themeIndex == .system {
appAppearance = retrieveCurrentSystem() == .dark ? NSAppearance(named: .darkAqua) : NSAppearance(named: .aqua)
}
if NSApp.appearance != appAppearance {
NSApp.appearance = appAppearance
}
}
}
private func fallbackImageProvider(_ lightImage: NSImage,
_ darkImage: NSImage,

Loading…
Cancel
Save