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:
@@ -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."""
|
||||||
|
|||||||
Reference in New Issue
Block a user