From b17762f8d9f90e4b082132c92a936eeab3684204 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 21 Apr 2020 18:41:05 -0400 Subject: [PATCH] Remove source name from history cards, slightly compacter --- .../tachiyomi/ui/recent/history/HistoryHolder.kt | 12 ++++-------- app/src/main/res/layout/history_item.xml | 16 +++++----------- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt index 2847af355..5c46149be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt @@ -10,8 +10,7 @@ import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.lang.toTimestampString import java.util.Date import kotlinx.android.synthetic.main.history_item.cover -import kotlinx.android.synthetic.main.history_item.last_read -import kotlinx.android.synthetic.main.history_item.manga_source +import kotlinx.android.synthetic.main.history_item.manga_subtitle import kotlinx.android.synthetic.main.history_item.manga_title import kotlinx.android.synthetic.main.history_item.remove import kotlinx.android.synthetic.main.history_item.resume @@ -56,13 +55,10 @@ class HistoryHolder( // Set manga title manga_title.text = manga.title - // Set source + chapter title + // Set chapter number + timestamp val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) - manga_source.text = itemView.context.getString(R.string.recent_manga_source) - .format(adapter.sourceManager.getOrStub(manga.source).toString(), formattedNumber) - - // Set last read timestamp title - last_read.text = Date(history.last_read).toTimestampString() + manga_subtitle.text = itemView.context.getString(R.string.recent_manga_time) + .format(formattedNumber, Date(history.last_read).toTimestampString()) // Set cover GlideApp.with(itemView.context).clear(cover) diff --git a/app/src/main/res/layout/history_item.xml b/app/src/main/res/layout/history_item.xml index 4946c2718..a84969134 100644 --- a/app/src/main/res/layout/history_item.xml +++ b/app/src/main/res/layout/history_item.xml @@ -5,15 +5,16 @@ + android:layout_below="@id/manga_title" /> -