From 6fd89fe54c7cabeb87cfd47e783f0e208b503c42 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Tue, 20 Aug 2024 20:19:02 +0200 Subject: [PATCH] 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) --- Kit/module/module.swift | 10 ++-------- Stats/Supporting Files/pl.lproj/Localizable.strings | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Kit/module/module.swift b/Kit/module/module.swift index e12aefea..fb4995ff 100644 --- a/Kit/module/module.swift +++ b/Kit/module/module.swift @@ -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]) } } diff --git a/Stats/Supporting Files/pl.lproj/Localizable.strings b/Stats/Supporting Files/pl.lproj/Localizable.strings index 3b96a0a3..6061a451 100644 --- a/Stats/Supporting Files/pl.lproj/Localizable.strings +++ b/Stats/Supporting Files/pl.lproj/Localizable.strings @@ -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";