This commit is contained in:
gedoor 2020-10-09 08:34:35 +08:00
parent 50c0090d80
commit 9eb3c895b0
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

@ -12,7 +12,7 @@ buildscript {
maven { url 'https://plugins.gradle.org/m2/' }
}
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 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
classpath 'com.google.gms:google-services:4.3.3'