fix: QQ单独走会话列表(消息列表UIA不更新)+微信保持消息列表优先

This commit is contained in:
youpaishidifu
2026-07-24 22:49:37 +08:00
parent c8c2f2ccc6
commit 4be6ae37c7
+7 -2
View File
@@ -182,11 +182,16 @@ class MessageMonitor:
def _read_messages(self, window, platform: str = "") -> list:
"""每轮重新定位 ListControl。"""
# 都优先读"消息"(当前选中对话的最新消息)
if platform == "qq":
# QQ NT: 消息列表 UIA 不更新,走会话列表(摘要文本实时)
texts = self._read_conversation_list(window)
if texts:
return texts
# 微信/默认: 优先读"消息"(当前选中对话的最新消息)
texts = self._read_message_list(window)
if texts:
return texts
# 兜底:会话列表(任何对话的摘要变化)
# 兜底:会话列表
texts = self._read_conversation_list(window)
if texts:
return texts