feat(services): streamline DBus menu caching and notification handling
- Consolidate logger disabling, cache empty menus with TTL, and move name resolution to a dedicated resolver to reduce duplication and improve performance
This commit is contained in:
6 files changed
+161
-75
No files matched your search
@@ -316,13 +316,10 @@ class ModusService(Service):
|
||||
self.current_active_app_name = "Finder"
|
||||
return
|
||||
|
||||
name = wmclass if wmclass else title
|
||||
if name:
|
||||
name = str(name).title()
|
||||
if "." in name:
|
||||
name = name.split(".")[-1]
|
||||
else:
|
||||
name = "Finder"
|
||||
# Delegate name resolution to app_name_resolver (lazy import to avoid circular)
|
||||
from utils.app_name_resolver import app_name_resolver
|
||||
|
||||
name = app_name_resolver.format_app_name(title, wmclass)
|
||||
|
||||
# Set wm_class FIRST so that signal handlers reading it get the new value
|
||||
self.current_active_wm_class = wmclass
|
||||
|
||||
Reference in new issue
Block a user