feat: 优化代码

pull/133/head
kunfei 5 years ago
parent 0983e43eaf
commit fa4ba277e2
  1. 4
      app/src/main/java/io/legado/app/service/CheckSourceService.kt

@ -64,7 +64,9 @@ class CheckSourceService : BaseService() {
private fun check() {
synchronized(this) {
processIndex++
}
if (processIndex < allIds.size) {
val sourceUrl = allIds[processIndex]
@ -81,6 +83,7 @@ class CheckSourceService : BaseService() {
checkedIds.size,
getString(R.string.progress_show, checkedIds.size, allIds.size)
)
synchronized(this) {
if (processIndex >= allIds.size + threadCount - 1) {
stopSelf()
}
@ -88,6 +91,7 @@ class CheckSourceService : BaseService() {
}
}
}
}
/**
* 更新通知

Loading…
Cancel
Save