From 0aed93becf38a96262c17427c216d382e6dfaf24 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 26 Jul 2020 16:14:22 -0400 Subject: [PATCH] Don't show chapter number in history item when unknown --- .../tachiyomi/ui/recent/history/HistoryHolder.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 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 2fc5ab056a..cd9a4799d3 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 @@ -57,10 +57,16 @@ class HistoryHolder( manga_title.text = manga.title // Set chapter number + timestamp - val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) - manga_subtitle.text = itemView.context.getString( - R.string.recent_manga_time, formattedNumber, Date(history.last_read).toTimestampString() - ) + if (chapter.chapter_number > -1f) { + val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) + 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 GlideApp.with(itemView.context).clear(cover)