remove rx call adapter since its not used anymore

This commit is contained in:
Carlos 2020-03-14 20:10:40 -04:00
parent 61f34b958c
commit a6d4b0a999
3 changed files with 2 additions and 8 deletions

View File

@ -135,7 +135,6 @@ dependencies {
val retrofit_version = "2.7.1" val retrofit_version = "2.7.1"
implementation("com.squareup.retrofit2:retrofit:$retrofit_version") implementation("com.squareup.retrofit2:retrofit:$retrofit_version")
implementation("com.squareup.retrofit2:converter-gson:$retrofit_version") implementation("com.squareup.retrofit2:converter-gson:$retrofit_version")
implementation("com.squareup.retrofit2:adapter-rxjava:$retrofit_version")
// JSON // JSON
implementation("com.google.code.gson:gson:2.8.6") implementation("com.google.code.gson:gson:2.8.6")

View File

@ -123,11 +123,11 @@ class Bangumi(private val context: Context, id: Int) : TrackService(id) {
} }
companion object { companion object {
const val READING = 3 const val PLANNING = 1
const val COMPLETED = 2 const val COMPLETED = 2
const val READING = 3
const val ON_HOLD = 4 const val ON_HOLD = 4
const val DROPPED = 5 const val DROPPED = 5
const val PLANNING = 1
const val DEFAULT_STATUS = READING const val DEFAULT_STATUS = READING
const val DEFAULT_SCORE = 0 const val DEFAULT_SCORE = 0

View File

@ -14,7 +14,6 @@ import eu.kanade.tachiyomi.network.POST
import okhttp3.FormBody import okhttp3.FormBody
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import retrofit2.Retrofit import retrofit2.Retrofit
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory
import retrofit2.converter.gson.GsonConverterFactory import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Body import retrofit2.http.Body
import retrofit2.http.Field import retrofit2.http.Field
@ -35,7 +34,6 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
.baseUrl(baseUrl) .baseUrl(baseUrl)
.client(authClient) .client(authClient)
.addConverterFactory(GsonConverterFactory.create(GsonBuilder().serializeNulls().create())) .addConverterFactory(GsonConverterFactory.create(GsonBuilder().serializeNulls().create()))
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.build() .build()
.create(KitsuApi.Rest::class.java) .create(KitsuApi.Rest::class.java)
@ -43,7 +41,6 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
.baseUrl(algoliaKeyUrl) .baseUrl(algoliaKeyUrl)
.client(authClient) .client(authClient)
.addConverterFactory(GsonConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.build() .build()
.create(KitsuApi.SearchKeyRest::class.java) .create(KitsuApi.SearchKeyRest::class.java)
@ -51,7 +48,6 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
.baseUrl(algoliaUrl) .baseUrl(algoliaUrl)
.client(client) .client(client)
.addConverterFactory(GsonConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.build() .build()
.create(KitsuApi.AgoliaSearchRest::class.java) .create(KitsuApi.AgoliaSearchRest::class.java)
@ -142,7 +138,6 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
.baseUrl(loginUrl) .baseUrl(loginUrl)
.client(client) .client(client)
.addConverterFactory(GsonConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.build() .build()
.create(KitsuApi.LoginRest::class.java) .create(KitsuApi.LoginRest::class.java)
.requestAccessToken(username, password) .requestAccessToken(username, password)