mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 23:28:58 +03:00
Update manga.last_update when any ChapterSourceSync.syncChaptersWithSource() occurs rather than only during LibraryUpdateService.updateChapterList() (#1535)
Viewing a manga's info page for the first time forces a chapter sync. Prior behavior would cause new chapters to be retrieved for that manga, but with manga.last_update remaining at 0 (until a library update occurred in which chapters were changed). The new behavior updates last_update any time the chapters are changed via syncChaptersWithSource().
This commit is contained in:
parent
762c378bd6
commit
16dc4d298d
2 changed files with 4 additions and 3 deletions
|
@ -304,9 +304,6 @@ class LibraryUpdateService(
|
|||
}
|
||||
// Add manga with new chapters to the list.
|
||||
.doOnNext { manga ->
|
||||
// Set last updated time
|
||||
manga.last_update = Date().time
|
||||
db.updateLastUpdated(manga).executeAsBlocking()
|
||||
// Add to the list
|
||||
newUpdates.add(manga)
|
||||
}
|
||||
|
|
|
@ -122,6 +122,10 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
|||
|
||||
// Fix order in source.
|
||||
db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking()
|
||||
|
||||
// Set this manga as updated since chapters were changed
|
||||
manga.last_update = Date().time
|
||||
db.updateLastUpdated(manga).executeAsBlocking()
|
||||
}
|
||||
return Pair(toAdd.subtract(readded).toList(), toDelete.subtract(readded).toList())
|
||||
|
||||
|
|
Loading…
Reference in a new issue