diff --git a/Modules/CPU/main.swift b/Modules/CPU/main.swift
index a997347c..5f27b3f5 100644
--- a/Modules/CPU/main.swift
+++ b/Modules/CPU/main.swift
@@ -160,12 +160,6 @@ public class CPU: Module {
self.portalView.callback(value)
self.notificationsView.loadCallback(value)
- if #available(macOS 11.0, *) {
- guard let blobData = try? JSONEncoder().encode(value) else { return }
- self.userDefaults?.set(blobData, forKey: "CPU@LoadReader")
- WidgetCenter.shared.reloadTimelines(ofKind: CPU_entry.kind)
- }
-
self.menuBar.widgets.filter{ $0.isActive }.forEach { (w: SWidget) in
switch w.item {
case let widget as Mini: widget.setValue(value.totalUsage)
@@ -213,5 +207,11 @@ public class CPU: Module {
default: break
}
}
+
+ if #available(macOS 11.0, *) {
+ guard let blobData = try? JSONEncoder().encode(value) else { return }
+ self.userDefaults?.set(blobData, forKey: "CPU@LoadReader")
+ WidgetCenter.shared.reloadTimelines(ofKind: CPU_entry.kind)
+ }
}
}
diff --git a/Modules/RAM/main.swift b/Modules/RAM/main.swift
index 69663adf..a2f3ef0a 100644
--- a/Modules/RAM/main.swift
+++ b/Modules/RAM/main.swift
@@ -135,12 +135,6 @@ public class RAM: Module {
self.portalView.callback(value)
self.notificationsView.loadCallback(value)
- if #available(macOS 11.0, *) {
- guard let blobData = try? JSONEncoder().encode(value) else { return }
- self.userDefaults?.set(blobData, forKey: "RAM@UsageReader")
- WidgetCenter.shared.reloadTimelines(ofKind: RAM_entry.kind)
- }
-
let total: Double = value.total == 0 ? 1 : value.total
self.menuBar.widgets.filter{ $0.isActive }.forEach { (w: SWidget) in
switch w.item {
@@ -182,5 +176,11 @@ public class RAM: Module {
default: break
}
}
+
+ if #available(macOS 11.0, *) {
+ guard let blobData = try? JSONEncoder().encode(value) else { return }
+ self.userDefaults?.set(blobData, forKey: "RAM@UsageReader")
+ WidgetCenter.shared.reloadTimelines(ofKind: RAM_entry.kind)
+ }
}
}
diff --git a/Stats.xcodeproj/project.pbxproj b/Stats.xcodeproj/project.pbxproj
index 9d846670..b717bca5 100644
--- a/Stats.xcodeproj/project.pbxproj
+++ b/Stats.xcodeproj/project.pbxproj
@@ -2746,7 +2746,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
- MARKETING_VERSION = 2.11.0;
+ MARKETING_VERSION = 2.11.1;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2785,7 +2785,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
- MARKETING_VERSION = 2.11.0;
+ MARKETING_VERSION = 2.11.1;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/Stats/Supporting Files/Info.plist b/Stats/Supporting Files/Info.plist
index ecce52c3..81223bec 100755
--- a/Stats/Supporting Files/Info.plist
+++ b/Stats/Supporting Files/Info.plist
@@ -17,7 +17,7 @@
CFBundleShortVersionString
$(MARKETING_VERSION)
CFBundleVersion
- 575
+ 577
Description
Simple macOS system monitor in your menu bar
LSApplicationCategoryType