Change fetch interval action to show days until next expected update

This commit is contained in:
arkon
2024-01-05 17:08:39 -05:00
parent e0a0942015
commit 32bed9b041
7 changed files with 102 additions and 61 deletions

View File

@ -1,8 +1,10 @@
package tachiyomi.domain.manga.model
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.model.UpdateStrategy
import tachiyomi.core.preference.TriState
import java.io.Serializable
import java.time.Instant
data class Manga(
val id: Long,
@ -29,6 +31,11 @@ data class Manga(
val favoriteModifiedAt: Long?,
) : Serializable {
val expectedNextUpdate: Instant?
get() = nextUpdate
.takeIf { status != SManga.COMPLETED.toLong() }
?.let { Instant.ofEpochMilli(it) }
val sorting: Long
get() = chapterFlags and CHAPTER_SORTING_MASK