fix: 引入导航缓存机制,增强 UI 适配能力 (BUG-004)

This commit is contained in:
2026-05-11 17:21:26 +08:00
parent 44ee194e5d
commit c48bbaaa41

View File

@@ -123,6 +123,11 @@ class WeChatADBEngine:
return ""
def _find_text(self, text: str, xml: str = None) -> Optional[Tuple[int, int]]:
# 优先从导航缓存读取
from services.wechat_nav_cache import nav_cache
cached = nav_cache.get_page("current")
if cached and text in cached.get("elements", {}):
return cached["elements"][text].get("center")
if xml is None:
xml = self._get_xml()
if not xml: