fix(src/window/controlcenter): add guard for destroyed state and adjust return value

This commit is contained in:
sankalp committed 2026-07-16 12:12:43 +05:45
1 parent 843c33786f
commit e840917621
1 file changed
+6 -1
+6 -1
View File
@@ -193,6 +193,9 @@ class PerAppVolumeControl(Box):
def _populate_apps(self):
"""Populate the widget with current audio applications"""
if self._destroyed:
return False
from utils.functions import clear_children
clear_children(self.apps_container)
@@ -202,7 +205,7 @@ class PerAppVolumeControl(Box):
# Use fabric audio service for applications
if not audio_service:
self._show_no_apps_message()
return
return None
applications = getattr(audio_service, "applications", [])
@@ -230,6 +233,8 @@ class PerAppVolumeControl(Box):
else:
self._show_no_apps_message()
return False
def _show_no_apps_message(self):
"""Show message when no apps are playing audio"""
message = Label(