Skip to content

Commit

Permalink
fix count being wrong when syncing from dex into neko
Browse files Browse the repository at this point in the history
  • Loading branch information
nonproto committed Oct 11, 2020
1 parent cf9dc9d commit 8e70821
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class LibraryUpdateService(

// Increment and update if it is not already favorited
if (!dbManga.favorite) {
count.incrementAndGet()
countNew.incrementAndGet()
dbManga.favorite = true
dbManga.copyFrom(networkManga)
db.insertManga(dbManga).executeAsBlocking()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ class LibraryPresenter(

if (filterMangaType > 0) {
if (if (filterMangaType == Manga.TYPE_MANHWA) {
(filterMangaType != item.manga.mangaType() && filterMangaType != Manga.TYPE_WEBTOON)
} else {
(filterMangaType != item.manga.mangaType() && filterMangaType != Manga.TYPE_WEBTOON)
} else {
filterMangaType != item.manga.mangaType()
}
) return false
Expand Down Expand Up @@ -512,9 +512,9 @@ class LibraryPresenter(
categories.forEach { category ->
val catId = category.id ?: return@forEach
if (catId > 0 && !categorySet.contains(catId) && (
catId !in categoriesHidden ||
!showAll
)
catId !in categoriesHidden ||
!showAll
)
) {
val headerItem = headerItems[catId]
if (headerItem != null) items.add(
Expand Down Expand Up @@ -938,7 +938,7 @@ class LibraryPresenter(
}
}

/** sync selectd manga to mangadex follows */
/** sync selected manga to mangadex follows */
fun syncMangaToDex(mangaList: List<Manga>) {
scope.launch {
withContext(Dispatchers.IO) {
Expand Down

0 comments on commit 8e70821

Please sign in to comment.