From 2df67c5691aa5f8d89a2ebe0240ba457c7900fc7 Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 18 Apr 2020 23:09:27 -0400 Subject: [PATCH] Bolding current chapter in reader's chapter list --- .../tachiyomi/ui/reader/ReaderChapterItem.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterItem.kt index a4ee97606b..567bd3475d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterItem.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.ui.reader import android.content.res.ColorStateList +import android.graphics.Typeface import android.text.format.DateUtils import android.view.View import android.widget.FrameLayout @@ -13,7 +14,6 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.util.system.getResourceColor -import kotlinx.android.synthetic.main.chapters_item.* import java.text.DecimalFormat import java.text.DecimalFormatSymbols import java.util.Date @@ -83,15 +83,22 @@ class ReaderChapterItem(val chapter: Chapter, val manga: Manga, val isCurrent: B chapterTitle.setTextColor( when { - item.isCurrent -> activeColor - chapter.read -> readColor + chapter.bookmark -> activeColor + chapter.read && !item.isCurrent -> readColor else -> unreadColor } ) + if (item.isCurrent) { + chapterTitle.setTypeface(null, Typeface.BOLD) + chapterSubtitle.setTypeface(null, Typeface.BOLD) + } else { + chapterTitle.setTypeface(null, Typeface.NORMAL) + chapterSubtitle.setTypeface(null, Typeface.NORMAL) + } + chapterSubtitle.setTextColor( when { - item.isCurrent -> activeColor chapter.read -> readColor else -> unreadColor }