feat: removed logic that will disable module when no widgets are enabled. It makes more sense since there is a combined module view and details can be seen even if no widget is enabled. (#2072)

This commit is contained in:
Serhiy Mytrovtsiy
2024-08-20 20:19:02 +02:00
parent 9a72f3e01d
commit 6fd89fe54c
2 changed files with 3 additions and 9 deletions

View File

@@ -324,14 +324,8 @@ open class Module {
return
}
let isEmpty = self.menuBar.widgets.filter({ $0.isActive }).isEmpty
var state = self.enabled
if isEmpty && self.enabled {
state = false
} else if !isEmpty && !self.enabled {
state = true
if !isEmpty && !self.enabled {
NotificationCenter.default.post(name: .toggleModule, object: nil, userInfo: ["module": self.config.name, "state": true])
}
NotificationCenter.default.post(name: .toggleModule, object: nil, userInfo: ["module": self.config.name, "state": state])
}
}

View File

@@ -213,7 +213,7 @@
"Widgets" = "Widżety";
"Popup" = "Okienko";
"Notifications" = "Powiadomienia";
"Merge widgets" = "Pąłącz widżety";
"Merge widgets" = "Połącz widżety";
"No available widgets to configure" = "Brak dostępnych widżetów do konfiguracji";
"No options to configure for the popup in this module" = "Brak opcji do skonfigurowania dla okienka w tym module";
"Process" = "Proces";