mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2026-02-02 17:10:45 +01:00
Handle deprecated gql sort again (#983)
This commit is contained in:
@@ -149,7 +149,7 @@ class CategoryQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(CategoryOrder(CategoryOrderBy.ID, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { CategoryOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
@@ -233,7 +233,7 @@ class ChapterQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(ChapterOrder(ChapterOrderBy.ID, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { ChapterOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
@@ -183,7 +183,7 @@ class ExtensionQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(ExtensionOrder(ExtensionOrderBy.PKG_NAME, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { ExtensionOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
@@ -251,7 +251,7 @@ class MangaQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(MangaOrder(MangaOrderBy.ID, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { MangaOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
@@ -133,7 +133,7 @@ class MetaQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(MetaOrder(MetaOrderBy.KEY, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { MetaOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
@@ -149,7 +149,7 @@ class SourceQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(SourceOrder(SourceOrderBy.ID, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { SourceOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
@@ -151,7 +151,7 @@ class TrackQuery {
|
||||
}
|
||||
}
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(TrackerOrder(TrackerOrderBy.ID, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { TrackerOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
@@ -412,7 +412,7 @@ class TrackQuery {
|
||||
|
||||
res.applyOps(condition, filter)
|
||||
|
||||
if (order != null || (last != null || before != null)) {
|
||||
if (order != null || orderBy != null || (last != null || before != null)) {
|
||||
val baseSort = listOf(TrackRecordOrder(TrackRecordOrderBy.ID, SortOrder.ASC))
|
||||
val deprecatedSort = listOfNotNull(orderBy?.let { TrackRecordOrder(orderBy, orderByType) })
|
||||
val actualSort = (order.orEmpty() + deprecatedSort + baseSort)
|
||||
|
||||
Reference in New Issue
Block a user