Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(淘宝): 修改通知匹配规则,适配更多场景 #709

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

minglu7
Copy link
Contributor

@minglu7 minglu7 commented Jan 14, 2025

今天发现淘宝系统消息通知更改了文字提示,因此做了适配

],
matches:
'[text^="开启系统通知"] + @Image[visibleToUser=true] <<n [vid="poplayer_inner_view"]',
matches: ['[text*="通知"]', 'Image[visibleToUser=true]'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image[visibleToUser=true] 并不能快速查询,且这个选择器会匹配上多个节点

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我在测试规则的时候 是能选到目标x号的 我记得有一个规则好像是说 命中多个元素的时候 默认最前面那个 但是没找到出处 你记得吗

Copy link
Owner

@AIsouler AIsouler Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

编写规则时应该以唯一节点为目标,Image[visibleToUser=true] 太宽泛了,容易误触,并且在所有选择器都能快速查询的情况下才使用 matches数组,否则不建议使用

@@ -100,13 +100,14 @@ export default defineGkdApp({
'com.taobao.android.tbabilitykit.pop.StdPopContainerActivity',
'com.taobao.tao.TBMainActivity',
'com.taobao.tao.welcome.Welcome',
'com.taobao.tao.welcome.Welcome',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

无需添加重复的activityid

@AIsouler AIsouler merged commit bd42ca5 into AIsouler:main Jan 14, 2025
1 check passed
@minglu7 minglu7 deleted the taobao branch January 14, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants