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