fix: disabled widgets update for macOS 26 since there is a problem with chronod

This commit is contained in:
Serhiy Mytrovtsiy
2025-09-30 17:34:07 +02:00
parent 04bec8503c
commit a07c3cf323
8 changed files with 34 additions and 24 deletions

View File

@@ -326,9 +326,11 @@ public class Network: Module {
}
if #available(macOS 11.0, *) {
guard let blobData = try? JSONEncoder().encode(raw) else { return }
self.userDefaults?.set(blobData, forKey: "Network@UsageReader")
WidgetCenter.shared.reloadTimelines(ofKind: Network_entry.kind)
if #unavailable(macOS 26.0) {
guard let blobData = try? JSONEncoder().encode(raw) else { return }
self.userDefaults?.set(blobData, forKey: "Network@UsageReader")
WidgetCenter.shared.reloadTimelines(ofKind: Network_entry.kind)
}
}
}