mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 11:42:22 +08:00
perf: reset topActivity
This commit is contained in:
parent
f30dda43bf
commit
46942903d9
|
@ -190,9 +190,11 @@ class GkdAbService : CompositionAbService({
|
|||
topActivityFlow.value = TopActivity(appId = rightAppId)
|
||||
}
|
||||
getAndUpdateCurrentRules()
|
||||
if (queryTaskJob?.isActive != true) {
|
||||
Thread.sleep(300)
|
||||
newQueryTask()
|
||||
scope.launch(actionThread) {
|
||||
delay(300)
|
||||
if (queryTaskJob?.isActive != true) {
|
||||
newQueryTask()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +208,7 @@ class GkdAbService : CompositionAbService({
|
|||
}
|
||||
if (activityRule !== getAndUpdateCurrentRules()) break
|
||||
if (rule.checkDelay() && rule.actionDelayJob == null) {
|
||||
rule.actionDelayJob = scope.launch(queryThread) {
|
||||
rule.actionDelayJob = scope.launch(actionThread) {
|
||||
delay(rule.actionDelay)
|
||||
rule.actionDelayJob = null
|
||||
newQueryTask()
|
||||
|
|
Loading…
Reference in New Issue
Block a user