diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt b/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt index 384269df0..255214725 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt @@ -122,12 +122,12 @@ fun OkHttpClient.newCachelessCallWithProgress(request: Request, listener: Progre } inline fun Response.parseAs(): T { - return internalParseAs(this, typeOf()) + return internalParseAs(typeOf(), this) } @Suppress("UNCHECKED_CAST") @OptIn(ExperimentalSerializationApi::class) -fun internalParseAs(response: Response, type: KType): T { +fun internalParseAs(type: KType, response: Response): T { val deserializer = serializer(type) as KSerializer return response.body.source().use { Injekt.get().decodeFromBufferedSource(deserializer, it)