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
@ -304,9 +304,6 @@ class LibraryUpdateService(
|
|||||||
}
|
}
|
||||||
// Add manga with new chapters to the list.
|
// Add manga with new chapters to the list.
|
||||||
.doOnNext { manga ->
|
.doOnNext { manga ->
|
||||||
// Set last updated time
|
|
||||||
manga.last_update = Date().time
|
|
||||||
db.updateLastUpdated(manga).executeAsBlocking()
|
|
||||||
// Add to the list
|
// Add to the list
|
||||||
newUpdates.add(manga)
|
newUpdates.add(manga)
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,10 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
|||||||
|
|
||||||
// Fix order in source.
|
// Fix order in source.
|
||||||
db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking()
|
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())
|
return Pair(toAdd.subtract(readded).toList(), toDelete.subtract(readded).toList())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user