mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Update inLibraryAt timestamp when adding manga to library (#911)
This commit is contained in:
@@ -13,6 +13,7 @@ import suwayomi.tachidesk.manga.impl.Manga
|
|||||||
import suwayomi.tachidesk.manga.model.table.MangaMetaTable
|
import suwayomi.tachidesk.manga.model.table.MangaMetaTable
|
||||||
import suwayomi.tachidesk.manga.model.table.MangaTable
|
import suwayomi.tachidesk.manga.model.table.MangaTable
|
||||||
import suwayomi.tachidesk.server.JavalinSetup.future
|
import suwayomi.tachidesk.server.JavalinSetup.future
|
||||||
|
import java.time.Instant
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,6 +57,7 @@ class MangaMutation {
|
|||||||
MangaTable.update({ MangaTable.id inList ids }) { update ->
|
MangaTable.update({ MangaTable.id inList ids }) { update ->
|
||||||
patch.inLibrary.also {
|
patch.inLibrary.also {
|
||||||
update[inLibrary] = it
|
update[inLibrary] = it
|
||||||
|
if (it) update[inLibraryAt] = Instant.now().epochSecond
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user