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:
sankalp committed 2026-07-18 14:12:37 +05:45
1 parent c47009addd
commit 6ef48af963
1 file changed
+2 -3
+2 -3
View File
@@ -370,10 +370,9 @@ class Panel(Window):
try:
modus_service.disconnect_by_func(self.on_dnd_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:
_config_handlers.remove(self._on_config_changed)
off_config_change(self._on_config_changed)
except Exception as e:
logger.error(f"An error occurred: {e}")