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

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

* Fix spotless

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
This commit is contained in:
renovate[bot]andFooIbar authored and GitHub committed 2025-11-15 08:13:23 +00:00
1 parent 806560cf59
commit 4611a77e04
16 files changed
+6 -32

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
[*.{kt,kts}]
ij_kotlin_imports_layout = *
ij_kotlin_line_break_after_multiline_when_entry = false
ktlint_code_style = intellij_idea
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_class-signature = disabled
ktlint_standard_mixed-condition-operators = disabled
@@ -180,7 +180,6 @@ fun WebView(
is WebContent.Url -> {
wv.loadUrl(content.url, content.additionalHttpHeaders)
}
is WebContent.Data -> {
wv.loadDataWithBaseURL(
content.baseUrl,
@@ -190,14 +189,12 @@ fun WebView(
content.historyUrl,
)
}
is WebContent.Post -> {
wv.postUrl(
content.url,
content.postData,
)
}
is WebContent.NavigatorOnly -> {
// NO-OP
}
@@ -502,11 +499,9 @@ class WebViewNavigator(private val coroutineScope: CoroutineScope) {
event.encoding,
event.historyUrl,
)
is NavigationEvent.LoadUrl -> {
loadUrl(event.url, event.additionalHttpHeaders)
}
is NavigationEvent.PostUrl -> {
postUrl(event.url, event.postData)
}
@@ -212,7 +212,6 @@ data class ListUrlBuilder(
}
}
}.buildString()
MODE_UPLOADER, MODE_TAG -> {
val path = if (mode == MODE_UPLOADER) "uploader" else "tag"
ehUrl(listOf(path, requireNotNull(mKeyword))) {
@@ -222,7 +221,6 @@ data class ListUrlBuilder(
addQueryParameterIfNotBlank("range", range.takeIf { it > 0 }?.toString())
}.buildString()
}
MODE_WHATS_HOT -> EhUrl.popularUrl
MODE_IMAGE_SEARCH -> ehUrl {
addQueryParameter("f_shash", requireNotNull(hash))
@@ -231,7 +229,6 @@ data class ListUrlBuilder(
addQueryParameter("tl", requireNotNull(mKeyword))
addQueryParameterIfNotBlank("p", jumpTo)
}.buildString()
else -> throw IllegalStateException("Unexpected value: $mode")
}
@@ -42,7 +42,6 @@ object GalleryListUrlParser {
mode = if (head == "uploader") ListUrlBuilder.MODE_UPLOADER else ListUrlBuilder.MODE_TAG
keyword = segments[1].decodeURLQueryComponent(plusIsSpace = true)
}
"toplist.php" -> {
val tl = url.parameters["tl"]
if (tl != null && tl in arrayOf("11", "12", "13", "15")) {
@@ -55,7 +54,6 @@ object GalleryListUrlParser {
null
}
}
else -> {
val category = EhUtils.getCategory(head)
if (category != EhUtils.UNKNOWN) {
@@ -113,14 +113,12 @@ class DownloadService :
val label = intent.getStringExtra(KEY_LABEL)
deferredMgr.await().startDownload(decodeFromSavedState(gi), label)
}
ACTION_START_RANGE -> {
val gidList = intent.getLongArrayExtra(KEY_GID_LIST)
if (gidList != null) {
deferredMgr.await().startRangeDownload(gidList)
}
}
ACTION_START_ALL -> deferredMgr.await().startAllDownload()
ACTION_STOP_ALL -> deferredMgr.await().stopAllDownload()
ACTION_CLEAR -> clear()
@@ -388,7 +386,6 @@ class DownloadService :
notifyManager.notify(id, builder.build())
}
}
Ops.Cancel -> notifyManager.cancel(id)
Ops.StartForeground -> service.startForeground(id, builder.build())
}
@@ -130,7 +130,6 @@ class Image private constructor(image: CoilImage, private val src: ImageSource)
}
src.right().decodeCoil(checkExtraneousAds)
}
is ByteBufferSource -> {
if (isAtLeastP && !isAtLeastU) {
rewriteGifSource(src.source)
@@ -68,7 +68,6 @@ fun GalleryInfo.getComicInfo(): ComicInfo {
else -> Unit
}
}
else -> simpleTags?.forEach { tagString ->
val (namespace, tag) = tagString.split(':', limit = 2)
.takeIf { it.size == 2 } ?: return@forEach // Ignore temp tags that don't have namespace
@@ -129,11 +129,9 @@ class SpiderDen(val info: GalleryInfo) {
SpiderQueen.MODE_READ -> {
containInCache(index) || containInDownloadDir(index)
}
SpiderQueen.MODE_DOWNLOAD -> {
containInDownloadDir(index) || copyFromCacheToDownloadDir(index)
}
else -> {
false
}
@@ -233,7 +233,6 @@ private suspend fun doModifyFavorites(
}
false
}
LOCAL_FAVORITED -> {
if (localFavorited) {
EhDB.removeLocalFavorites(galleryInfo)
@@ -248,7 +247,6 @@ private suspend fun doModifyFavorites(
}
!localFavorited
}
in 0..9 -> {
EhEngine.modifyFavorites(gid, token, slot, note)
favoriteSlot = slot
@@ -256,7 +254,6 @@ private suspend fun doModifyFavorites(
favoriteNote = note
true
}
else -> throw EhException("Invalid favorite slot!")
}
FavouriteStatusRouter.notify(galleryInfo)
@@ -305,13 +302,11 @@ suspend fun doGalleryInfoAction(info: BaseGalleryInfo) {
EhDB.putHistoryInfo(info)
navToReader(info)
}
1 -> if (downloaded) {
confirmRemoveDownload(info)
} else {
startDownload(false, info)
}
2 -> if (favorited) {
runSuspendCatching {
removeFromFavorites(info)
@@ -327,7 +322,6 @@ suspend fun doGalleryInfoAction(info: BaseGalleryInfo) {
tip(R.string.add_to_favorite_failure)
}
}
3 -> showMoveDownloadLabel(info)
}
}
@@ -207,7 +207,6 @@ fun GalleryList(
}
}
}
is LoadState.Error -> {
Surface {
ErrorTip(
@@ -216,7 +215,6 @@ fun GalleryList(
)
}
}
is LoadState.NotLoading -> if (data.itemCount == 0) {
// Only for local favorites as empty gallery lists from network are treated as error
ErrorTip(modifier = Modifier.widthIn(max = 228.dp), text = stringResource(id = R.string.gallery_list_empty_hit))
@@ -22,7 +22,6 @@ fun LoadStateIndicator(
is LoadState.Loading -> {
LinearWavyProgressIndicator(modifier = modifier)
}
is LoadState.Error -> {
Column(modifier = modifier, horizontalAlignment = Alignment.CenterHorizontally) {
Text(text = state.error.displayString())
@@ -31,6 +30,5 @@ fun LoadStateIndicator(
}
}
}
is LoadState.NotLoading -> Unit
}
@@ -204,20 +204,17 @@ private fun PageContainer(
moveToNext()
}
}
NavigationRegion.PREV -> {
val canPan = if (isRtl) panLeft(distance, bounds) else panRight(distance, bounds)
if (!canPan) {
moveToPrevious()
}
}
NavigationRegion.RIGHT -> {
if (!panLeft(distance, bounds)) {
if (isRtl) moveToPrevious() else moveToNext()
}
}
NavigationRegion.LEFT -> {
if (!panRight(distance, bounds)) {
if (isRtl) moveToNext() else moveToPrevious()
@@ -320,7 +320,6 @@ fun GalleryDetailContent(
galleryPreview(galleryDetail, previews) { navToReader(galleryDetail.galleryInfo, it) }
}
}
else -> FastScrollLazyVerticalGrid(
columns = GridCells.Fixed(thumbColumns),
contentPadding = contentPadding,
@@ -86,6 +86,7 @@ internal abstract class HorizontalDragGestureNode(
private fun startListeningForEvents() {
isListeningForEvents = true
@Suppress("ktlint:standard:kdoc")
/**
* To preserve the original behavior we had (before the Modifier.Node migration) we need to
* scope the DragStopped and DragCancel methods to the node's coroutine scope instead of using
@@ -14,6 +14,8 @@
* limitations under the License.
*/
@file:Suppress("ktlint:standard:kdoc")
package androidx.compose.material3.fork
/**
+1 -1
View File
@@ -97,7 +97,7 @@ kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutine
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinx-io" }
ktlint = "com.pinterest.ktlint:ktlint-cli:1.7.1"
ktlint = "com.pinterest.ktlint:ktlint-cli:1.8.0"
okhttp-bom = { module = "com.squareup.okhttp3:okhttp-bom", version.ref = "okhttp" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }