mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-21 20:27:06 +03:00
fix(tracking): Don't show unusable tracking services (#1174)
This commit is contained in:
parent
ee33c145a5
commit
afb921a5a2
2 changed files with 8 additions and 2 deletions
|
@ -47,6 +47,7 @@ import eu.kanade.presentation.track.anime.AnimeTrackInfoDialogHome
|
||||||
import eu.kanade.presentation.track.anime.AnimeTrackServiceSearch
|
import eu.kanade.presentation.track.anime.AnimeTrackServiceSearch
|
||||||
import eu.kanade.presentation.util.Screen
|
import eu.kanade.presentation.util.Screen
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
|
import eu.kanade.tachiyomi.data.track.AnimeTrackService
|
||||||
import eu.kanade.tachiyomi.data.track.EnhancedAnimeTrackService
|
import eu.kanade.tachiyomi.data.track.EnhancedAnimeTrackService
|
||||||
import eu.kanade.tachiyomi.data.track.TrackManager
|
import eu.kanade.tachiyomi.data.track.TrackManager
|
||||||
import eu.kanade.tachiyomi.data.track.TrackService
|
import eu.kanade.tachiyomi.data.track.TrackService
|
||||||
|
@ -249,7 +250,9 @@ data class AnimeTrackInfoDialogHomeScreen(
|
||||||
|
|
||||||
private fun List<AnimeTrack>.mapToTrackItem(): List<AnimeTrackItem> {
|
private fun List<AnimeTrack>.mapToTrackItem(): List<AnimeTrackItem> {
|
||||||
val dbTracks = map { it.toDbTrack() }
|
val dbTracks = map { it.toDbTrack() }
|
||||||
val loggedServices = Injekt.get<TrackManager>().services.filter { it.isLogged }
|
val loggedServices = Injekt.get<TrackManager>().services.filter {
|
||||||
|
it.isLogged && it is AnimeTrackService
|
||||||
|
}
|
||||||
val source = Injekt.get<AnimeSourceManager>().getOrStub(sourceId)
|
val source = Injekt.get<AnimeSourceManager>().getOrStub(sourceId)
|
||||||
return loggedServices
|
return loggedServices
|
||||||
// Map to TrackItem
|
// Map to TrackItem
|
||||||
|
|
|
@ -48,6 +48,7 @@ import eu.kanade.presentation.track.manga.MangaTrackServiceSearch
|
||||||
import eu.kanade.presentation.util.Screen
|
import eu.kanade.presentation.util.Screen
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.track.EnhancedMangaTrackService
|
import eu.kanade.tachiyomi.data.track.EnhancedMangaTrackService
|
||||||
|
import eu.kanade.tachiyomi.data.track.MangaTrackService
|
||||||
import eu.kanade.tachiyomi.data.track.TrackManager
|
import eu.kanade.tachiyomi.data.track.TrackManager
|
||||||
import eu.kanade.tachiyomi.data.track.TrackService
|
import eu.kanade.tachiyomi.data.track.TrackService
|
||||||
import eu.kanade.tachiyomi.data.track.model.MangaTrackSearch
|
import eu.kanade.tachiyomi.data.track.model.MangaTrackSearch
|
||||||
|
@ -248,7 +249,9 @@ data class MangaTrackInfoDialogHomeScreen(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun List<MangaTrack>.mapToTrackItem(): List<MangaTrackItem> {
|
private fun List<MangaTrack>.mapToTrackItem(): List<MangaTrackItem> {
|
||||||
val loggedServices = Injekt.get<TrackManager>().services.filter { it.isLogged }
|
val loggedServices = Injekt.get<TrackManager>().services.filter {
|
||||||
|
it.isLogged && it is MangaTrackService
|
||||||
|
}
|
||||||
val source = Injekt.get<MangaSourceManager>().getOrStub(sourceId)
|
val source = Injekt.get<MangaSourceManager>().getOrStub(sourceId)
|
||||||
return loggedServices
|
return loggedServices
|
||||||
// Map to TrackItem
|
// Map to TrackItem
|
||||||
|
|
Loading…
Reference in a new issue