|
|
|
@ -39,7 +39,7 @@ abstract class HistoryDao {
|
|
|
|
ListSortOrder.NEWEST -> "history.created_at DESC"
|
|
|
|
ListSortOrder.NEWEST -> "history.created_at DESC"
|
|
|
|
ListSortOrder.PROGRESS -> "history.percent DESC"
|
|
|
|
ListSortOrder.PROGRESS -> "history.percent DESC"
|
|
|
|
ListSortOrder.ALPHABETIC -> "manga.title"
|
|
|
|
ListSortOrder.ALPHABETIC -> "manga.title"
|
|
|
|
ListSortOrder.NEW_CHAPTERS -> "(SELECT chapters_new FROM tracks WHERE tracks.manga_id = manga.manga_id) DESC"
|
|
|
|
ListSortOrder.NEW_CHAPTERS -> "IFNULL((SELECT chapters_new FROM tracks WHERE tracks.manga_id = manga.manga_id), 0) DESC"
|
|
|
|
else -> throw IllegalArgumentException("Sort order $order is not supported")
|
|
|
|
else -> throw IllegalArgumentException("Sort order $order is not supported")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|