Merge remote-tracking branch 'upstream/master' into MR

This commit is contained in:
LuftVerbot 2023-10-26 18:56:43 +02:00
commit 5d575f1e90
3 changed files with 9 additions and 2 deletions

View file

@ -48,6 +48,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
@ -250,7 +251,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

View file

@ -49,6 +49,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
@ -249,7 +250,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

View file

@ -113,6 +113,7 @@ class GestureHandler(
} }
override fun onLongPress(e: MotionEvent) { override fun onLongPress(e: MotionEvent) {
if (SeekState.mode == SeekState.LOCKED) { playerControls.toggleControls(); return }
activity.openScreenshotSheet() activity.openScreenshotSheet()
} }
} }