fix(controlcenter): suppress expected signal disconnect errors

- volume_scale/brightness_scale disconnect_by_func may fail if signals
  were never connected (e.g. on first hide before resources init)
- Downgrade from error to silent pass
This commit is contained in:
sankalp committed 2026-07-22 10:38:41 +05:45
1 parent 4bd99e221a
commit ed712b7af1
1 file changed
+4 -4
+4 -4
View File
@@ -651,14 +651,14 @@ class ModusControlCenter(AppletWindow):
try:
self.volume_scale.disconnect_by_func(self.set_volume)
self.volume_scale.disconnect_by_func(self.on_volume_scroll)
except Exception as e:
logger.error(f"An error occurred: {e}")
except Exception:
pass
if hasattr(self, "brightness_scale"):
try:
self.brightness_scale.disconnect_by_func(self.set_brightness)
self.brightness_scale.disconnect_by_func(self.on_brightness_scroll)
except Exception as e:
logger.error(f"An error occurred: {e}")
except Exception:
pass
self._signals_connected = False
self._resources_initialized = False