Add user manga notes (#428)

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
kunet
2025-03-29 17:18:38 -04:00
committed by GitHub
parent 132d77aa99
commit 8fbe630308
26 changed files with 596 additions and 16 deletions

View File

@@ -0,0 +1,18 @@
package tachiyomi.domain.manga.interactor
import tachiyomi.domain.manga.model.MangaUpdate
import tachiyomi.domain.manga.repository.MangaRepository
class UpdateMangaNotes(
private val mangaRepository: MangaRepository,
) {
suspend operator fun invoke(mangaId: Long, notes: String): Boolean {
return mangaRepository.update(
MangaUpdate(
id = mangaId,
notes = notes,
),
)
}
}

View File

@@ -32,6 +32,7 @@ data class Manga(
val lastModifiedAt: Long,
val favoriteModifiedAt: Long?,
val version: Long,
val notes: String,
) : Serializable {
val expectedNextUpdate: Instant?
@@ -126,6 +127,7 @@ data class Manga(
lastModifiedAt = 0L,
favoriteModifiedAt = null,
version = 0L,
notes = "",
)
}
}

View File

@@ -24,6 +24,7 @@ data class MangaUpdate(
val updateStrategy: UpdateStrategy? = null,
val initialized: Boolean? = null,
val version: Long? = null,
val notes: String? = null,
)
fun Manga.toMangaUpdate(): MangaUpdate {
@@ -49,5 +50,6 @@ fun Manga.toMangaUpdate(): MangaUpdate {
updateStrategy = updateStrategy,
initialized = initialized,
version = version,
notes = notes,
)
}