fix(panel): replace broken _config_handlers import with off_config_change
Panel destroy was importing nonexistent _config_handlers from config, causing silent ImportError and leaked reload callbacks.
This commit is contained in:
1 file changed
+2
-3
@@ -370,10 +370,9 @@ class Panel(Window):
|
|||||||
try:
|
try:
|
||||||
modus_service.disconnect_by_func(self.on_dnd_changed)
|
modus_service.disconnect_by_func(self.on_dnd_changed)
|
||||||
notification_service.disconnect_by_func(self.on_notification_count_changed)
|
notification_service.disconnect_by_func(self.on_notification_count_changed)
|
||||||
from services.config import _config_handlers
|
from services.config import off_config_change
|
||||||
|
|
||||||
if self._on_config_changed in _config_handlers:
|
off_config_change(self._on_config_changed)
|
||||||
_config_handlers.remove(self._on_config_changed)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"An error occurred: {e}")
|
logger.error(f"An error occurred: {e}")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user