feat(dbus): Update status change notification in feature toggle methods

Added calls to `StatusChanged` in `Disable` and `Enable` methods to
notify when a feature's state is updated. This ensures proper tracking
and external communication of feature status changes.

Signed-off-by: Sven Sager <s.sager@kunbus.com>
This commit is contained in:
Sven Sager
2025-05-27 14:18:13 +02:00
parent 40059d6068
commit 8d01eee66d

View File

@@ -61,11 +61,13 @@ class InterfaceRevpiConfig(DbusInterface):
"""Disable the feature.""" """Disable the feature."""
feature_function = get_feature(feature) feature_function = get_feature(feature)
feature_function.function(ConfigActions.DISABLE, *feature_function.args) feature_function.function(ConfigActions.DISABLE, *feature_function.args)
self.StatusChanged(feature, False)
def Enable(self, feature: str) -> None: def Enable(self, feature: str) -> None:
"""Enable the feature.""" """Enable the feature."""
feature_function = get_feature(feature) feature_function = get_feature(feature)
feature_function.function(ConfigActions.ENABLE, *feature_function.args) feature_function.function(ConfigActions.ENABLE, *feature_function.args)
self.StatusChanged(feature, True)
def GetStatus(self, feature: str) -> bool: def GetStatus(self, feature: str) -> bool:
"""Get feature status.""" """Get feature status."""