pull/416/head
gedoor 4 years ago
parent 50c0090d80
commit 9eb3c895b0
  1. 1
      app/src/main/java/io/legado/app/service/CheckSourceService.kt
  2. 5
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  3. 2
      build.gradle

@ -78,6 +78,7 @@ class CheckSourceService : BaseService() {
allIds.addAll(ids) allIds.addAll(ids)
processIndex = 0 processIndex = 0
threadCount = min(allIds.size, threadCount) threadCount = min(allIds.size, threadCount)
postEvent(EventBus.CHECK_INIT, allIds.size)
updateNotification(0, getString(R.string.progress_show, "", 0, allIds.size)) updateNotification(0, getString(R.string.progress_show, "", 0, allIds.size))
for (i in 0 until threadCount) { for (i in 0 until threadCount) {
check() check()

@ -299,15 +299,14 @@ class BookSourceActivity : VMBaseActivity<BookSourceViewModel>(R.layout.activity
CheckSource.keyword = it CheckSource.keyword = it
} }
} }
if (AppConfig.backgroundVerification) { if (!AppConfig.backgroundVerification) {
CheckSource.start(this@BookSourceActivity, adapter.getSelection())
} else {
val bundle = Bundle() val bundle = Bundle()
bundle.putInt("maxProgress", adapter.getSelection().size) bundle.putInt("maxProgress", adapter.getSelection().size)
CheckSourceDialog().apply { CheckSourceDialog().apply {
arguments = bundle arguments = bundle
}.show(supportFragmentManager, "CheckDialog") }.show(supportFragmentManager, "CheckDialog")
} }
CheckSource.start(this@BookSourceActivity, adapter.getSelection())
} }
noButton { } noButton { }
}.show().applyTint() }.show().applyTint()

@ -12,7 +12,7 @@ buildscript {
maven { url 'https://plugins.gradle.org/m2/' } maven { url 'https://plugins.gradle.org/m2/' }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.0.1' classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3' classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.gms:google-services:4.3.3'

Loading…
Cancel
Save