Fix read duration statistic getting inflated when restoring history

This commit is contained in:
arkon 2023-12-25 16:35:13 -05:00
parent 2d7650537d
commit 950b4a6c90

View file

@ -328,7 +328,7 @@ class MangaRestorer(
readAt = max(item.readAt?.time ?: 0L, dbHistory.last_read?.time ?: 0L) readAt = max(item.readAt?.time ?: 0L, dbHistory.last_read?.time ?: 0L)
.takeIf { it > 0L } .takeIf { it > 0L }
?.let { Date(it) }, ?.let { Date(it) },
readDuration = max(item.readDuration, dbHistory.time_read), readDuration = max(item.readDuration, dbHistory.time_read) - dbHistory.time_read,
) )
} }