Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user