diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt index 51025c1a4..1c03d5fd9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt @@ -66,7 +66,7 @@ class HistoryPresenter : BasePresenter() { .map { recents -> val map = TreeMap> { d1, d2 -> d2.compareTo(d1) } val byDay = recents - .groupByTo(map, { it.history.last_read.toDateKey() }) + .groupByTo(map) { it.history.last_read.toDateKey() } byDay.flatMap { entry -> val dateItem = DateSectionItem(entry.key, relativeTime, dateFormat) entry.value.map { HistoryItem(it, dateItem) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt index f0c9b5369..a22003a5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt @@ -84,7 +84,7 @@ class UpdatesPresenter : BasePresenter() { .map { mangaChapters -> val map = TreeMap> { d1, d2 -> d2.compareTo(d1) } val byDay = mangaChapters - .groupByTo(map, { it.chapter.date_fetch.toDateKey() }) + .groupByTo(map) { it.chapter.date_fetch.toDateKey() } byDay.flatMap { entry -> val dateItem = DateSectionItem(entry.key, relativeTime, dateFormat) entry.value diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt index f5c86a8fb..33bf15dfd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt @@ -112,8 +112,8 @@ fun Date.toRelativeString( val days = difference.floorDiv(MILLISECONDS_IN_DAY).toInt() return when { difference < 0 -> context.getString(R.string.recently) - difference < MILLISECONDS_IN_DAY -> context.getString(R.string.relative_time_today) - difference < MILLISECONDS_IN_DAY.times(range) -> context.resources.getQuantityString( + difference <= MILLISECONDS_IN_DAY -> context.getString(R.string.relative_time_today) + difference <= MILLISECONDS_IN_DAY.times(range) -> context.resources.getQuantityString( R.plurals.relative_time, days, days