pull/282/head
gedoor 4 years ago
parent 792167b407
commit bdfb91744d
  1. 4
      app/build.gradle
  2. 2
      app/src/main/java/io/legado/app/help/AppConfig.kt
  3. 2
      app/src/main/java/io/legado/app/help/SourceHelp.kt

@ -85,6 +85,10 @@ android {
applicationId "io.legado.play"
manifestPlaceholders = [APP_CHANNEL_VALUE: "google"]
}
coolApk {
dimension "version"
manifestPlaceholders = [APP_CHANNEL_VALUE: "coolApk"]
}
}
compileOptions {
// Flag to enable support for the new language APIs

@ -137,5 +137,7 @@ object AppConfig {
val readBodyToLh: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.readBodyToLh, true)
val isGooglePlay: Boolean get() = App.INSTANCE.channel == "google"
val isCoolApk: Boolean get() = App.INSTANCE.channel == "coolApk"
}

@ -48,7 +48,7 @@ object SourceHelp {
private fun is18Plus(url: String?): Boolean {
url ?: return false
if (AppConfig.isGooglePlay) return false
if (!AppConfig.isCoolApk) return false
val baseUrl = NetworkUtils.getBaseUrl(url)
baseUrl ?: return false
try {

Loading…
Cancel
Save