From af20c613a42fc9309da280e15dd66d865968505e Mon Sep 17 00:00:00 2001 From: len Date: Sun, 10 Apr 2016 17:53:02 +0200 Subject: [PATCH] Hide upload date if not parsed --- .../kanade/tachiyomi/ui/manga/chapter/ChaptersHolder.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersHolder.kt index e971268a1f..5e35c3e390 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersHolder.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.ui.manga.chapter import android.content.Context -import android.support.v4.content.ContextCompat import android.view.View import android.widget.PopupMenu import eu.kanade.tachiyomi.R @@ -46,8 +45,12 @@ class ChaptersHolder(private val view: View, private val adapter: ChaptersAdapte chapter_title.text = name chapter_title.setTextColor(if (chapter.read) readColor else unreadColor) - chapter_date.text = df.format(Date(chapter.date_upload)) - chapter_date.setTextColor(if (chapter.read) readColor else unreadColor) + if (chapter.date_upload > 0) { + chapter_date.text = df.format(Date(chapter.date_upload)) + chapter_date.setTextColor(if (chapter.read) readColor else unreadColor) + } else { + chapter_date.text = "" + } if (!chapter.read && chapter.last_page_read > 0) { chapter_pages.text = context.getString(R.string.chapter_progress, chapter.last_page_read + 1)