feat: moved all modules to the new way of reader mode with a small refactoring

This commit is contained in:
Serhiy Mytrovtsiy
2024-02-10 17:03:47 +01:00
parent 1e9073424b
commit 7e833176d9
30 changed files with 222 additions and 320 deletions

View File

@@ -26,8 +26,8 @@ internal class Settings: NSStackView, Settings_v {
private var hyperthreadView: NSView? = nil
private var button: NSPopUpButton?
public init(_ title: String) {
self.title = title
public init(_ module: ModuleType) {
self.title = module.rawValue
self.selectedGPU = Store.shared.string(key: "\(self.title)_gpu", defaultValue: "")
self.updateIntervalValue = Store.shared.int(key: "\(self.title)_updateInterval", defaultValue: self.updateIntervalValue)
self.showTypeValue = Store.shared.bool(key: "\(self.title)_showType", defaultValue: self.showTypeValue)