fix(controlcenter): flush stale-cache races in toggle UI
- Drop rfkill from bluetooth toggle (redundant with D-Bus Powered, was causing stale cache on next read) - Force toggle switch and icon to target state immediately after setting, don't wait for D-Bus callback - Fix nightlight icon race: flip local is_active instead of re-querying async kill state - Guard wifi on_network_ready against ethernet-first device loop (emits device-ready per device; wifi_device None on first) - Share single NetworkClient between main panel and wifi popup (eliminates async-init race of two independent instances) - Strip connected: prefix from wlan label initial display - Add _pending_toggle pattern to wifi notify handler to suppress stale-cache revert; same for bluetooth switch lock
This commit is contained in:
4 files changed
+78
-64
No files matched your search
@@ -33,8 +33,9 @@ def create_night_light_widget(control_center):
|
||||
)
|
||||
|
||||
def toggle_ui(*_):
|
||||
nonlocal is_active
|
||||
if toggle_night_light():
|
||||
is_active = is_night_light_active()
|
||||
is_active = not is_active
|
||||
night_light_icon.dynamic_file(
|
||||
"applets/redshift-status-on.svg"
|
||||
if is_active
|
||||
|
||||
Reference in new issue
Block a user