mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 10:37:51 +02:00
Remove source name from history cards, slightly compacter
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user