mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 11:21:49 +01:00
MangaPresenter: Filter unsupported track service from available service list (#8286)
This commit is contained in:
parent
15f7e53e4f
commit
82b552ac9a
@ -861,9 +861,11 @@ class MangaPresenter(
|
|||||||
.catch { logcat(LogPriority.ERROR, it) }
|
.catch { logcat(LogPriority.ERROR, it) }
|
||||||
.map { tracks ->
|
.map { tracks ->
|
||||||
val dbTracks = tracks.map { it.toDbTrack() }
|
val dbTracks = tracks.map { it.toDbTrack() }
|
||||||
loggedServices.map { service ->
|
loggedServices
|
||||||
TrackItem(dbTracks.find { it.sync_id.toLong() == service.id }, service)
|
// Map to TrackItem
|
||||||
}
|
.map { service -> TrackItem(dbTracks.find { it.sync_id.toLong() == service.id }, service) }
|
||||||
|
// Show only if the service supports this manga's source
|
||||||
|
.filter { (it.service as? EnhancedTrackService)?.accept(source!!) ?: true }
|
||||||
}
|
}
|
||||||
.collectLatest { trackItems ->
|
.collectLatest { trackItems ->
|
||||||
_trackList = trackItems
|
_trackList = trackItems
|
||||||
|
Loading…
Reference in New Issue
Block a user