Remove source name from history cards, slightly compacter

This commit is contained in:
arkon
2020-04-21 18:41:05 -04:00
parent b3611eef9d
commit b17762f8d9
3 changed files with 10 additions and 20 deletions

View File

@ -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)