Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0 (#1786)

* Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0

* Format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-12-06 12:37:19 -05:00
committed by GitHub
parent 949829ae6b
commit 83c94c044d
37 changed files with 524 additions and 143 deletions

View File

@@ -61,8 +61,14 @@ class TrackQuery {
cursor: Cursor,
): Boolean =
when (this) {
ID -> tracker.id > cursor.value.toInt()
NAME -> tracker.name > cursor.value
ID -> {
tracker.id > cursor.value.toInt()
}
NAME -> {
tracker.name > cursor.value
}
IS_LOGGED_IN -> {
val value = cursor.value.substringAfter('-').toBooleanStrict()
!value || tracker.isLoggedIn
@@ -74,8 +80,14 @@ class TrackQuery {
cursor: Cursor,
): Boolean =
when (this) {
ID -> tracker.id < cursor.value.toInt()
NAME -> tracker.name < cursor.value
ID -> {
tracker.id < cursor.value.toInt()
}
NAME -> {
tracker.name < cursor.value
}
IS_LOGGED_IN -> {
val value = cursor.value.substringAfter('-').toBooleanStrict()
value || !tracker.isLoggedIn
@@ -159,18 +171,21 @@ class TrackQuery {
res =
when (orderType) {
SortOrder.DESC, SortOrder.DESC_NULLS_FIRST, SortOrder.DESC_NULLS_LAST ->
SortOrder.DESC, SortOrder.DESC_NULLS_FIRST, SortOrder.DESC_NULLS_LAST -> {
when (orderBy) {
TrackerOrderBy.ID -> res.sortedByDescending { it.id }
TrackerOrderBy.NAME -> res.sortedByDescending { it.name }
TrackerOrderBy.IS_LOGGED_IN -> res.sortedByDescending { it.isLoggedIn }
}
SortOrder.ASC, SortOrder.ASC_NULLS_FIRST, SortOrder.ASC_NULLS_LAST ->
}
SortOrder.ASC, SortOrder.ASC_NULLS_FIRST, SortOrder.ASC_NULLS_LAST -> {
when (orderBy) {
TrackerOrderBy.ID -> res.sortedBy { it.id }
TrackerOrderBy.NAME -> res.sortedBy { it.name }
TrackerOrderBy.IS_LOGGED_IN -> res.sortedBy { it.isLoggedIn }
}
}
}
}
}