From 073e9f94ff06a538c4aa06aa3db0ac1a6cf5be5b Mon Sep 17 00:00:00 2001 From: stevenyomi <95685115+stevenyomi@users.noreply.github.com> Date: Sat, 29 Oct 2022 10:44:31 +0800 Subject: [PATCH] Reorder parameters of JSON parsing method (#8321) --- .../main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)