mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Show bookmark badge or sub chapters in recents
also fix where that badge shows when showing the title first in recents
This commit is contained in:
parent
31ec0ec945
commit
de1442b953
1 changed files with 12 additions and 15 deletions
|
@ -157,21 +157,18 @@ class RecentMangaHolder(
|
||||||
val chapterName =
|
val chapterName =
|
||||||
item.chapter.preferredChapterName(context, item.mch.manga, adapter.preferences)
|
item.chapter.preferredChapterName(context, item.mch.manga, adapter.preferences)
|
||||||
|
|
||||||
binding.title.apply {
|
listOf(binding.title, binding.subtitle).forEach {
|
||||||
text = if (!showTitleFirst) {
|
it.apply {
|
||||||
chapterName
|
setCompoundDrawablesRelative(null, null, null, null)
|
||||||
} else {
|
translationX = 0f
|
||||||
item.mch.manga.title
|
text = if (!showTitleFirst.xor(it === binding.subtitle)) {
|
||||||
|
ChapterUtil.setTextViewForChapter(this, item)
|
||||||
|
chapterName
|
||||||
|
} else {
|
||||||
|
setTextColor(ChapterUtil.readColor(context, item))
|
||||||
|
item.mch.manga.title
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ChapterUtil.setTextViewForChapter(this, item)
|
|
||||||
}
|
|
||||||
binding.subtitle.apply {
|
|
||||||
text = if (!showTitleFirst) {
|
|
||||||
item.mch.manga.title
|
|
||||||
} else {
|
|
||||||
chapterName
|
|
||||||
}
|
|
||||||
setTextColor(ChapterUtil.readColor(context, item))
|
|
||||||
}
|
}
|
||||||
if (binding.frontView.translationX == 0f) {
|
if (binding.frontView.translationX == 0f) {
|
||||||
binding.read.setImageResource(
|
binding.read.setImageResource(
|
||||||
|
@ -343,7 +340,7 @@ class RecentMangaHolder(
|
||||||
val context = itemView.context
|
val context = itemView.context
|
||||||
val showDLs = adapter.showDownloads
|
val showDLs = adapter.showDownloads
|
||||||
title.text = chapter.preferredChapterName(context, item.mch.manga, adapter.preferences)
|
title.text = chapter.preferredChapterName(context, item.mch.manga, adapter.preferences)
|
||||||
title.setTextColor(ChapterUtil.readColor(context, chapter))
|
ChapterUtil.setTextViewForChapter(title, chapter)
|
||||||
val notReadYet = item.chapter.id != item.mch.chapter.id && item.mch.history.id != null
|
val notReadYet = item.chapter.id != item.mch.chapter.id && item.mch.history.id != null
|
||||||
subtitle.text = chapter.history?.let { history ->
|
subtitle.text = chapter.history?.let { history ->
|
||||||
context.timeSpanFromNow(R.string.read_, history.last_read)
|
context.timeSpanFromNow(R.string.read_, history.last_read)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue