mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-23 13:45:43 +03:00
Don't show chapter number in history item when unknown
This commit is contained in:
parent
1ea0804209
commit
0aed93becf
1 changed files with 10 additions and 4 deletions
|
@ -57,10 +57,16 @@ class HistoryHolder(
|
||||||
manga_title.text = manga.title
|
manga_title.text = manga.title
|
||||||
|
|
||||||
// Set chapter number + timestamp
|
// Set chapter number + timestamp
|
||||||
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
|
if (chapter.chapter_number > -1f) {
|
||||||
manga_subtitle.text = itemView.context.getString(
|
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
|
||||||
R.string.recent_manga_time, formattedNumber, Date(history.last_read).toTimestampString()
|
manga_subtitle.text = itemView.context.getString(
|
||||||
)
|
R.string.recent_manga_time,
|
||||||
|
formattedNumber,
|
||||||
|
Date(history.last_read).toTimestampString()
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
manga_subtitle.text = Date(history.last_read).toTimestampString()
|
||||||
|
}
|
||||||
|
|
||||||
// Set cover
|
// Set cover
|
||||||
GlideApp.with(itemView.context).clear(cover)
|
GlideApp.with(itemView.context).clear(cover)
|
||||||
|
|
Loading…
Reference in a new issue