瀏覽代碼

Fix read duration statistic getting inflated when restoring history

arkon 1 年之前
父節點
當前提交
950b4a6c90
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/eu/kanade/tachiyomi/data/backup/restore/restorers/MangaRestorer.kt

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/data/backup/restore/restorers/MangaRestorer.kt

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