Correctly detect initial fetch of chapters (#689)

Since the number of chapters gets converted to be index based, 1 available chapter would result in 0.

Due to this, in case a manga had exactly one chapter before updating the chapters, it was incorrectly detected as the initial fetch and the new chapters did not get automatically downloaded.
This commit is contained in:
schroda
2023-09-23 22:25:59 +02:00
committed by GitHub
parent 0a73177996
commit d81fafc9f6
@@ -210,7 +210,7 @@ object Chapter {
val numberOfNewChapters = updatedNumberOfChapters - currentNumberOfChapters
val areNewChaptersAvailable = numberOfNewChapters > 0
val wasInitialFetch = currentNumberOfChapters == 0
val wasInitialFetch = currentNumberOfChapters == -1 // has to be -1 - due to converting to index based 1 chapter will be 0
// make sure to ignore initial fetch
val isDownloadPossible =