From 3c1179d27b484bea09c6364d2161d76fd113761c Mon Sep 17 00:00:00 2001 From: Carlos Date: Fri, 21 Sep 2018 02:20:06 -0400 Subject: [PATCH] Fix NSFW Manga not showing in Kitsu (#1622) * add interceptor to kitsu * switch to shared client --- .../java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt index fe9e9e65d..fa72b6d54 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt @@ -16,9 +16,11 @@ import rx.Observable class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) { + private val authClient = client.newBuilder().addInterceptor(interceptor).build() + private val rest = Retrofit.Builder() .baseUrl(baseUrl) - .client(client.newBuilder().addInterceptor(interceptor).build()) + .client(authClient) .addConverterFactory(GsonConverterFactory.create(GsonBuilder().serializeNulls().create())) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .build() @@ -26,7 +28,7 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) private val searchRest = Retrofit.Builder() .baseUrl(algoliaKeyUrl) - .client(client) + .client(authClient) .addConverterFactory(GsonConverterFactory.create()) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .build()