SY linting

This commit is contained in:
Jobobby04
2022-09-11 19:43:45 -04:00
parent d58dda10d4
commit 3562816e89
67 changed files with 382 additions and 147 deletions
+3 -1
View File
@@ -40,7 +40,9 @@ val MANGADEX_LOGIN_PATCH: EHInterceptor = { request, response, sourceId ->
)
}
}
} else response
} else {
response
}
}
val MANGADEX_SOURCE_IDS = listOf(
@@ -20,8 +20,11 @@ fun OkHttpClient.Builder.injectPatches(sourceIdProducer: () -> Long): OkHttpClie
fun findAndApplyPatches(sourceId: Long): EHInterceptor {
// TODO make it so captcha doesnt auto open in manga eden while applying universal interceptors
return if (Injekt.get<PreferencesHelper>().autoSolveCaptcha().get()) (EH_INTERCEPTORS[sourceId].orEmpty() + EH_INTERCEPTORS[EH_UNIVERSAL_INTERCEPTOR].orEmpty()).merge()
else EH_INTERCEPTORS[sourceId].orEmpty().merge()
return if (Injekt.get<PreferencesHelper>().autoSolveCaptcha().get()) {
(EH_INTERCEPTORS[sourceId].orEmpty() + EH_INTERCEPTORS[EH_UNIVERSAL_INTERCEPTOR].orEmpty()).merge()
} else {
EH_INTERCEPTORS[sourceId].orEmpty().merge()
}
}
fun List<EHInterceptor>.merge(): EHInterceptor {
@@ -19,5 +19,7 @@ val CAPTCHA_DETECTION_PATCH: EHInterceptor = { request, response, sourceId ->
)
}
}
} else response
} else {
response
}
}