Address some warnings

This commit is contained in:
Jobobby04
2023-12-24 12:01:28 -05:00
parent 209da5eb04
commit 14cfc38724
12 changed files with 29 additions and 24 deletions
@@ -2,6 +2,7 @@ package eu.kanade.presentation.browse.components
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ViewList
import androidx.compose.material.icons.automirrored.outlined.Help
import androidx.compose.material.icons.filled.ViewModule
import androidx.compose.material.icons.outlined.Help
import androidx.compose.material.icons.outlined.Public
@@ -84,7 +85,7 @@ fun BrowseSourceToolbar(
add(
AppBar.Action(
title = stringResource(MR.strings.label_help),
icon = Icons.Outlined.Help,
icon = Icons.AutoMirrored.Outlined.Help,
onClick = onHelpClick,
),
)
@@ -12,8 +12,6 @@ import exh.md.network.MangaDexAuthInterceptor
import exh.md.utils.FollowStatus
import exh.md.utils.MdUtil
import kotlinx.collections.immutable.toImmutableList
import tachiyomi.core.util.lang.awaitSingle
import tachiyomi.core.util.lang.runAsObservable
import tachiyomi.core.util.lang.withIOContext
import tachiyomi.domain.manga.model.Manga
import tachiyomi.i18n.MR
@@ -146,15 +144,12 @@ class MdList(id: Long) : BaseTracker(id, "MDList") {
override suspend fun search(query: String): List<TrackSearch> {
return withIOContext {
val mdex = mdex ?: throw MangaDexNotFoundException()
mdex.fetchSearchManga(1, query, FilterList())
.flatMap { page ->
runAsObservable {
page.mangas.map {
toTrackSearch(mdex.getMangaDetails(it))
}.distinct()
}
mdex.getSearchManga(1, query, FilterList())
.mangas
.map {
toTrackSearch(mdex.getMangaDetails(it))
}
.awaitSingle()
.distinct()
}
}
@@ -474,6 +474,7 @@ class EHentai(
this
}
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getLatestUpdates"))
override fun fetchLatestUpdates(page: Int): Observable<MangasPage> {
return super<HttpSource>.fetchLatestUpdates(page).checkValid()
}
@@ -482,6 +483,7 @@ class EHentai(
return super<HttpSource>.getLatestUpdates(page).checkValid()
}
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getPopularManga"))
override fun fetchPopularManga(page: Int): Observable<MangasPage> {
return super<HttpSource>.fetchPopularManga(page).checkValid()
}
@@ -491,6 +493,7 @@ class EHentai(
}
// Support direct URL importing
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getSearchManga"))
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> =
urlImportFetchSearchManga(context, query) {
super<HttpSource>.fetchSearchManga(page, query, filters).checkValid()
@@ -112,10 +112,10 @@ class MangaDex(delegate: HttpSource, val context: Context) :
MangaPlusHandler(network.client)
}
private val comikeyHandler by lazy {
ComikeyHandler(network.cloudflareClient, network.defaultUserAgentProvider())
ComikeyHandler(network.client, network.defaultUserAgentProvider())
}
private val bilibiliHandler by lazy {
BilibiliHandler(network.cloudflareClient)
BilibiliHandler(network.client)
}
private val azukHandler by lazy {
AzukiHandler(network.client, network.defaultUserAgentProvider())
@@ -51,8 +51,10 @@ class NHentai(delegate: HttpSource, val context: Context) :
}
// Support direct URL importing
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getSearchManga"))
override fun fetchSearchManga(page: Int, query: String, filters: FilterList) =
urlImportFetchSearchManga(context, query) {
@Suppress("DEPRECATION")
super<DelegatedHttpSource>.fetchSearchManga(page, query, filters)
}
@@ -33,6 +33,7 @@ class EightMuses(delegate: HttpSource, val context: Context) :
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getSearchManga"))
override fun fetchSearchManga(page: Int, query: String, filters: FilterList) =
urlImportFetchSearchManga(context, query) {
@Suppress("DEPRECATION")
super<DelegatedHttpSource>.fetchSearchManga(page, query, filters)
}
@@ -32,6 +32,7 @@ class HBrowse(delegate: HttpSource, val context: Context) :
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getSearchManga"))
override fun fetchSearchManga(page: Int, query: String, filters: FilterList) =
urlImportFetchSearchManga(context, query) {
@Suppress("DEPRECATION")
super<DelegatedHttpSource>.fetchSearchManga(page, query, filters)
}
@@ -50,6 +50,7 @@ class Pururin(delegate: HttpSource, val context: Context) :
}
return urlImportFetchSearchManga(context, newQuery) {
@Suppress("DEPRECATION")
super<DelegatedHttpSource>.fetchSearchManga(page, query, filters)
}
}
@@ -38,6 +38,7 @@ class Tsumino(delegate: HttpSource, val context: Context) :
@Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getSearchManga"))
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> =
urlImportFetchSearchManga(context, query) {
@Suppress("DEPRECATION")
super<DelegatedHttpSource>.fetchSearchManga(page, query, filters)
}
@@ -4,7 +4,7 @@ import android.view.LayoutInflater
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ArrowForward
import androidx.compose.material.icons.automirrored.outlined.ArrowForward
import androidx.compose.material.icons.outlined.Deselect
import androidx.compose.material.icons.outlined.SelectAll
import androidx.compose.material3.Icon
@@ -114,7 +114,7 @@ class PreMigrationScreen(val mangaIds: List<Long>) : Screen() {
text = { Text(text = stringResource(MR.strings.action_migrate)) },
icon = {
Icon(
imageVector = Icons.Outlined.ArrowForward,
imageVector = Icons.AutoMirrored.Outlined.ArrowForward,
contentDescription = stringResource(MR.strings.action_migrate),
)
},