Change return value of SyncChaptersWithSource.await() (#7715)

* Change return value of `SyncChaptersWithSource.await()`

`updatedToAdd.subtract(reAdded).toList()` never worked as at this point `updatedToAdd` contained ids from db where `reAdded` had default one. Was the same case before the rewrite.

Removed `toDelete` from return value as it was not being used anywhere

* Add doc string

* Use HashSet

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
This commit is contained in:
AntsyLich
2022-08-11 19:06:46 +06:00
committed by GitHub
parent 1cbe225a94
commit 11f640cfee
3 changed files with 17 additions and 8 deletions

View File

@@ -521,7 +521,7 @@ class MangaPresenter(
val chapters = successState.source.getChapterList(successState.manga.toMangaInfo())
.map { it.toSChapter() }
val (newChapters, _) = syncChaptersWithSource.await(
val newChapters = syncChaptersWithSource.await(
chapters,
successState.manga,
successState.source,