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) }
|
||||
.map { tracks ->
|
||||
val dbTracks = tracks.map { it.toDbTrack() }
|
||||
loggedServices.map { service ->
|
||||
TrackItem(dbTracks.find { it.sync_id.toLong() == service.id }, service)
|
||||
}
|
||||
loggedServices
|
||||
// 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 ->
|
||||
_trackList = trackItems
|
||||
|
Loading…
Reference in New Issue
Block a user