From 9eb3c895b025187434d7f159c9a71027cc43f8fc Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 9 Oct 2020 08:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/service/CheckSourceService.kt | 1 + .../legado/app/ui/book/source/manage/BookSourceActivity.kt | 5 ++--- build.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/CheckSourceService.kt b/app/src/main/java/io/legado/app/service/CheckSourceService.kt index 3dde78066..b8349df45 100644 --- a/app/src/main/java/io/legado/app/service/CheckSourceService.kt +++ b/app/src/main/java/io/legado/app/service/CheckSourceService.kt @@ -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() diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 0dcfb2aa8..1f64f0791 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -299,15 +299,14 @@ class BookSourceActivity : VMBaseActivity(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() diff --git a/build.gradle b/build.gradle index 8846d3f5a..5029682c9 100644 --- a/build.gradle +++ b/build.gradle @@ -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'