From 9240ec7694e7934ed8148eb56b33dc43b4cbe783 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 11 Apr 2019 21:24:27 -0400 Subject: [PATCH] fix bug that was causing crash when setting r18 --- .../java/eu/kanade/tachiyomi/source/online/english/Mangadex.kt | 2 +- .../eu/kanade/tachiyomi/ui/setting/SettingsSiteController.kt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Mangadex.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Mangadex.kt index 33e85bd980..68bf86fb1a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Mangadex.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Mangadex.kt @@ -35,7 +35,7 @@ open class Mangadex(override val lang: String, private val internalLang: String, private val preferences: PreferencesHelper by injectLazy() - private fun clientBuilder(): OkHttpClient = clientBuilder(preferences.r18()) + private fun clientBuilder(): OkHttpClient = clientBuilder(preferences.r18().toInt()) private fun clientBuilder(r18Toggle: Int): OkHttpClient = network.cloudflareClient.newBuilder() .connectTimeout(10, TimeUnit.SECONDS) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSiteController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSiteController.kt index 2c37c70eab..bff6accb61 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSiteController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSiteController.kt @@ -30,7 +30,6 @@ class SettingsSiteController : SettingsController(), SourceLoginDialog.Listener } val sourcePreference = LoginCheckBoxPreference(context, sources[0] ).apply { - val id = source.id.toString() title = "MangaDex Login" key = getSourceKey(source.id) setOnLoginClickListener {