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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user