Skip to content

Commit

Permalink
perf: 优化 activityId 更新逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Nov 24, 2023
1 parent e7dd62d commit f7d3aa5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/java/li/songe/gkd/service/GkdAbService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,16 @@ class GkdAbService : CompositionAbService({
}
}

if (evAppId != rightAppId) {
if (getCurrentRules().rules.isEmpty()) {
// 放在 evAppId != rightAppId 的前面使得 TopActivity 能借助 lastTopActivity 恢复
return@launch
}

if (getCurrentRules().rules.isEmpty()) {
if (evAppId != rightAppId) {
return@launch
}


if (!storeFlow.value.enableService) return@launch
val jobVal = job
if (jobVal?.isActive == true) {
Expand Down

0 comments on commit f7d3aa5

Please sign in to comment.