File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
app/src/main/kotlin/li/songe/gkd Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,9 @@ sealed class RuleStatus(val name: String) {
205205
206206 val ok: Boolean
207207 get() = this == = StatusOk
208+
209+ val alive: Boolean
210+ get() = this != = Status1 && this != = Status2 && this != = Status4
208211}
209212
210213fun getFixActivityIds (
Original file line number Diff line number Diff line change @@ -455,8 +455,8 @@ private fun A11yService.useMatchRule() {
455455 }
456456 }
457457 val activityRule = getAndUpdateCurrentRules()
458- if ( evAppId != rightAppId || activityRule.skipMatch) {
459- // 放在 evAppId != rightAppId 的前面使得 TopActivity 能借助 lastTopActivity 恢复
458+ // 放在 evAppId != rightAppId 的前面使得 TopActivity 能借助 lastTopActivity 恢复
459+ if ( evAppId != rightAppId || activityRule.skipConsumeEvent || ! storeFlow.value.enableMatch) {
460460 return @launchEvent
461461 }
462462
Original file line number Diff line number Diff line change @@ -97,7 +97,11 @@ class ActivityRule(
9797 }
9898 val skipMatch: Boolean
9999 get() {
100- return ! currentRules.any { r -> r.status.ok } || ! storeFlow.value.enableMatch
100+ return currentRules.all { r -> ! r.status.ok }
101+ }
102+ val skipConsumeEvent: Boolean
103+ get() {
104+ return currentRules.all { r -> ! r.status.alive }
101105 }
102106}
103107
You can’t perform that action at this time.
0 commit comments