Skip to content

Commit

Permalink
feat: removed logic that will disable module when no widgets are enab…
Browse files Browse the repository at this point in the history
…led. It makes more sense since there is a combined module view and details can be seen even if no widget is enabled. (#2072)
  • Loading branch information
exelban committed Aug 20, 2024
1 parent 9a72f3e commit 6fd89fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions Kit/module/module.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
}
2 changes: 1 addition & 1 deletion Stats/Supporting Files/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 6fd89fe

Please sign in to comment.