Address some build warnings

(cherry picked from commit 2d7650537db907a4129f4a07db15950339b319e9)

# Conflicts:
#	README.md
#	app/src/main/java/eu/kanade/presentation/category/components/CategoryDialogs.kt
#	source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/model/SManga.kt
This commit is contained in:
arkon
2023-12-25 16:31:40 -05:00
committed by Jobobby04
parent fa11413e90
commit 4003263828
32 changed files with 106 additions and 154 deletions
@@ -51,6 +51,7 @@ fun OkHttpClient.Builder.rateLimitHost(
* @param permits [Int] Number of requests allowed within a period of units.
* @param period [Duration] The limiting duration. Defaults to 1.seconds.
*/
@Suppress("UNUSED")
fun OkHttpClient.Builder.rateLimitHost(
httpUrl: HttpUrl,
permits: Int,
@@ -71,5 +72,6 @@ fun OkHttpClient.Builder.rateLimitHost(
* @param permits [Int] Number of requests allowed within a period of units.
* @param period [Duration] The limiting duration. Defaults to 1.seconds.
*/
@Suppress("UNUSED")
fun OkHttpClient.Builder.rateLimitHost(url: String, permits: Int, period: Duration = 1.seconds) =
addInterceptor(RateLimitInterceptor(url.toHttpUrlOrNull()?.host, permits, period))
@@ -51,6 +51,7 @@ class InMemoryPreferenceStore(
TODO("Not yet implemented")
}
@Suppress("UNCHECKED_CAST")
override fun <T> getObject(
key: String,
defaultValue: T,
@@ -59,7 +60,7 @@ class InMemoryPreferenceStore(
): Preference<T> {
val default = InMemoryPreference(key, null, defaultValue)
val data: T? = preferences[key]?.get() as? T
return if (data == null) default else InMemoryPreference<T>(key, data, defaultValue)
return if (data == null) default else InMemoryPreference(key, data, defaultValue)
}
override fun getAll(): Map<String, *> {