Show Mangadex relations in Mangadex similar
This commit is contained in:
@@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.data.track.TrackManager
|
||||
import eu.kanade.tachiyomi.data.track.mdlist.MdList
|
||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.MetadataMangasPage
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
@@ -284,10 +285,14 @@ class MangaDex(delegate: HttpSource, val context: Context) :
|
||||
return mangaHandler.fetchRandomMangaId()
|
||||
}
|
||||
|
||||
suspend fun getMangaSimilar(manga: MangaInfo): MangasPage {
|
||||
suspend fun getMangaSimilar(manga: MangaInfo): MetadataMangasPage {
|
||||
return similarHandler.getSimilar(manga)
|
||||
}
|
||||
|
||||
suspend fun getMangaRelated(manga: MangaInfo): MetadataMangasPage {
|
||||
return similarHandler.getRelated(manga)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val dataSaverPref = "dataSaverV5"
|
||||
|
||||
|
||||
+4
@@ -61,6 +61,10 @@ class SourceComfortableGridHolder(private val view: View, private val adapter: F
|
||||
binding.badges.localText.text = itemView.context.resources.getStringArray(R.array.md_follows_options).asList()[it]
|
||||
binding.badges.localText.isVisible = true
|
||||
}
|
||||
metadata.relation?.let {
|
||||
binding.badges.localText.setText(it.resId)
|
||||
binding.badges.localText.isVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
|
||||
+4
@@ -58,6 +58,10 @@ open class SourceCompactGridHolder(private val view: View, private val adapter:
|
||||
binding.badges.localText.text = itemView.context.resources.getStringArray(R.array.md_follows_options).asList()[it]
|
||||
binding.badges.localText.isVisible = true
|
||||
}
|
||||
metadata.relation?.let {
|
||||
binding.badges.localText.setText(it.resId)
|
||||
binding.badges.localText.isVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
|
||||
@@ -58,6 +58,10 @@ class SourceListHolder(private val view: View, adapter: FlexibleAdapter<*>) :
|
||||
binding.localText.text = itemView.context.resources.getStringArray(R.array.md_follows_options).asList()[it]
|
||||
binding.localText.isVisible = true
|
||||
}
|
||||
metadata.relation?.let {
|
||||
binding.localText.setText(it.resId)
|
||||
binding.localText.isVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
|
||||
Reference in New Issue
Block a user