Skip to content

Commit

Permalink
Remove category filter (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 authored May 24, 2023
1 parent ff7ac8a commit 945ec81
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import suwayomi.tachidesk.graphql.server.primitives.lessNotUnique
import suwayomi.tachidesk.graphql.server.primitives.maybeSwap
import suwayomi.tachidesk.graphql.types.MangaNodeList
import suwayomi.tachidesk.graphql.types.MangaType
import suwayomi.tachidesk.manga.model.table.CategoryMangaTable
import suwayomi.tachidesk.manga.model.table.MangaStatus
import suwayomi.tachidesk.manga.model.table.MangaTable
import java.util.concurrent.CompletableFuture
Expand Down Expand Up @@ -172,7 +171,6 @@ class MangaQuery {
val realUrl: StringFilter? = null,
val lastFetchedAt: LongFilter? = null,
val chaptersLastFetchedAt: LongFilter? = null,
val category: IntFilter? = null,
override val and: List<MangaFilter>? = null,
override val or: List<MangaFilter>? = null,
override val not: MangaFilter? = null
Expand All @@ -196,8 +194,6 @@ class MangaQuery {
andFilterWithCompare(MangaTable.inLibraryAt, chaptersLastFetchedAt)
)
}

fun getCategoryOp() = andFilterWithCompareEntity(CategoryMangaTable.category, category)
}

fun mangas(
Expand All @@ -214,14 +210,6 @@ class MangaQuery {
val queryResults = transaction {
val res = MangaTable.selectAll()

val categoryOp = filter?.getCategoryOp()
if (categoryOp != null) {
res.adjustColumnSet {
innerJoin(CategoryMangaTable)
}
res.andWhere { categoryOp }
}

res.applyOps(condition, filter)

if (orderBy != null || (last != null || before != null)) {
Expand Down

0 comments on commit 945ec81

Please sign in to comment.