From 0d349588788d6ae1681325a278d108c9f5236620 Mon Sep 17 00:00:00 2001 From: macmade Date: Thu, 20 Jun 2024 22:21:49 +0200 Subject: [PATCH] fix: Trying to fix #86 - KVO triggered from the thermal log queue. --- Hot/Classes/InfoViewController.swift | 3 +++ Hot/UI/Base.lproj/MainMenu.xib | 11 +++++------ Submodules/Sensors | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Hot/Classes/InfoViewController.swift b/Hot/Classes/InfoViewController.swift index 752e441..22f1944 100644 --- a/Hot/Classes/InfoViewController.swift +++ b/Hot/Classes/InfoViewController.swift @@ -34,6 +34,7 @@ public class InfoViewController: NSViewController @objc public private( set ) dynamic var speedLimit: Int = 0 @objc public private( set ) dynamic var temperature: Int = 0 @objc public private( set ) dynamic var thermalPressure: Int = 0 + @objc public private( set ) dynamic var hasSensors: Bool = false public var onUpdate: ( () -> Void )? @@ -115,6 +116,8 @@ public class InfoViewController: NSViewController private func update() { + self.hasSensors = self.log.sensors.isEmpty == false + if let n = self.log.schedulerLimit?.intValue { self.schedulerLimit = n diff --git a/Hot/UI/Base.lproj/MainMenu.xib b/Hot/UI/Base.lproj/MainMenu.xib index 03737f2..175f552 100644 --- a/Hot/UI/Base.lproj/MainMenu.xib +++ b/Hot/UI/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -651,8 +651,7 @@ - - + @@ -705,9 +704,9 @@ - + - DictionaryIsEmpty + NSNegateBoolean diff --git a/Submodules/Sensors b/Submodules/Sensors index 48c8a97..565b5d0 160000 --- a/Submodules/Sensors +++ b/Submodules/Sensors @@ -1 +1 @@ -Subproject commit 48c8a975ac3b8deded8b7363fce9a428a7facd23 +Subproject commit 565b5d01d3743d60119db1b3b58f469f5e7202a0