Merge remote-tracking branch 'origin/master'

This commit is contained in:
kunfei
2022-09-20 09:29:55 +08:00
4 changed files with 22 additions and 6 deletions
@@ -72,6 +72,7 @@ class CheckSourceService : BaseService() {
IntentAction.start -> intent.getStringArrayListExtra("selectIds")?.let {
check(it)
}
IntentAction.resume -> upNotification()
else -> stopSelf()
}
@@ -154,7 +155,7 @@ class CheckSourceService : BaseService() {
}
}
//校验发现书籍
if (CheckSource.checkDiscovery) {
if (CheckSource.checkDiscovery && !source.exploreUrl.isNullOrBlank()) {
val exs = source.exploreKinds()
var url: String? = null
for (ex in exs) {
@@ -13,8 +13,14 @@ import io.legado.app.help.config.AppConfig
@SuppressLint("RequiresFeature")
fun WebSettings.setDarkeningAllowed(allow: Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
WebSettingsCompat.setAlgorithmicDarkeningAllowed(this, allow)
} else if (AppConfig.isNightTheme) {
kotlin.runCatching {
WebSettingsCompat.setAlgorithmicDarkeningAllowed(this, allow)
return
}.onFailure {
it.printOnDebug()
}
}
if (AppConfig.isNightTheme) {
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK_STRATEGY)) {
@Suppress("DEPRECATION")
WebSettingsCompat.setForceDarkStrategy(