mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-28 12:07:52 +02:00
Combine author and artist fields in manga info
This commit is contained in:
@ -137,21 +137,6 @@ class MangaInfoController(private val fromSource: Boolean = false) :
|
||||
}
|
||||
.launchIn(scope)
|
||||
|
||||
binding.mangaArtist.longClicks()
|
||||
.onEach {
|
||||
activity?.copyToClipboard(
|
||||
binding.mangaArtistLabel.text.toString(),
|
||||
binding.mangaArtist.text.toString()
|
||||
)
|
||||
}
|
||||
.launchIn(scope)
|
||||
|
||||
binding.mangaArtist.clicks()
|
||||
.onEach {
|
||||
performGlobalSearch(binding.mangaArtist.text.toString())
|
||||
}
|
||||
.launchIn(scope)
|
||||
|
||||
binding.mangaAuthor.longClicks()
|
||||
.onEach {
|
||||
activity?.copyToClipboard(
|
||||
@ -231,18 +216,12 @@ class MangaInfoController(private val fromSource: Boolean = false) :
|
||||
manga.title
|
||||
}
|
||||
|
||||
// Update artist TextView.
|
||||
binding.mangaArtist.text = if (manga.artist.isNullOrBlank()) {
|
||||
// Update author/artist TextView.
|
||||
val authors = listOf(manga.author, manga.artist).filter { !it.isNullOrBlank() }.distinct()
|
||||
binding.mangaAuthor.text = if (authors.isEmpty()) {
|
||||
view.context.getString(R.string.unknown)
|
||||
} else {
|
||||
manga.artist
|
||||
}
|
||||
|
||||
// Update author TextView.
|
||||
binding.mangaAuthor.text = if (manga.author.isNullOrBlank()) {
|
||||
view.context.getString(R.string.unknown)
|
||||
} else {
|
||||
manga.author
|
||||
authors.joinToString(", ")
|
||||
}
|
||||
|
||||
// If manga source is known update source TextView.
|
||||
|
Reference in New Issue
Block a user