- Notifications
You must be signed in to change notification settings - Fork1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Sourcery refactored master branch#1
base:master
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -27,16 +27,11 @@ def _analyze_message_type(chat_item_content_layout): | ||
# 文本消息(或不支持的消息) | ||
if layout_type == 'android.widget.TextView': | ||
txt = chat_item_content_layout.get_text().strip() | ||
return ('', 'Unknown') if txt[4:] == '请使用最新版手机QQ查看。' else (txt, 'Text') | ||
elif layout_type == 'android.widget.LinearLayout': | ||
txt = chat_item_content_layout.child( | ||
'com.tencent.qqlite:id/chat_item_content_text').get_text().strip() | ||
return txt, 'Text' | ||
Comment on lines -30 to -39 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Function
This removes the following comments (why? ):
| ||
elif layout_type == 'android.widget.RelativeLayout': | ||
# 图片 | ||
if chat_item_content_layout.child("com.tencent.qqlite:id/pic").exists(): | ||
@@ -82,11 +77,10 @@ def __init__(self, driver, hot=False): | ||
self._hot = hot | ||
def init_latest_message(self): | ||
if message_list := self.get_message_list(): | ||
self.latest_message = message_list[-1] | ||
self.title = self.get_title() | ||
logger_yiri.info(f'Session set up. Title: {self.title}') | ||
Comment on lines -85 to +83 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Function
| ||
def normalize_qqlite(self): | ||
self.poco.normalize_qqlite() | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,8 +6,8 @@ | ||
@yiri.on_message() | ||
def on_message(msg, title, sender): | ||
print(f'>>>{msg}') | ||
if msg[:4] == '####': | ||
yiri.send_message(f'msg={msg}, title={title}, sender={sender}') | ||
Comment on lines -9 to +11 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Function
| ||
yiri.run() |