Do not count mangas as part of categories that aren't in the library (#574)

Otherwise, the returned "size" of a property doesn't match the actual manga list, since that list only includes mangas from the library.
This commit is contained in:
schroda
2023-06-09 16:57:16 +02:00
committed by GitHub
parent 561d680e78
commit b59af683ac
@@ -142,9 +142,8 @@ object Category {
.select { MangaTable.inLibrary eq true }
.andWhere { CategoryMangaTable.manga.isNull() }
} else {
CategoryMangaTable.select {
CategoryMangaTable.category eq categoryId
}
CategoryMangaTable.leftJoin(MangaTable).select { CategoryMangaTable.category eq categoryId }
.andWhere { MangaTable.inLibrary eq true }
}.count().toInt()
}
}