Compare commits

...
21 Commits
Author SHA1 Message Date
FooIbar 2c155fe599 Prepare for release 1.14.1
Releases / build (push) Has been cancelled
2025-07-31 18:34:50 +08:00
renovate[bot] 323de69ba0 Update dependency androidx.test.ext:junit to v1.3.0 (#2527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 01:52:48 +00:00
renovate[bot] 0cdc6be34f Update dependency androidx.browser:browser to v1.9.0 (#2526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 01:52:18 +00:00
FooIbar 36c1703763 Renew GitHub token and prepare for a point release 2025-07-31 09:43:10 +08:00
renovate[bot] ee3d2f681c Update dependency androidx.work:work-runtime to v2.10.3 (#2525)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 23:05:17 +00:00
renovate[bot] 11ce900868 Update dependency androidx.compose:compose-bom-alpha to v2025.07.01 (#2523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 19:59:25 +00:00
renovate[bot] b936dd2533 Update benchmark to v1.4.0 (#2522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 19:58:11 +00:00
renovate[bot] fab8cd0c1f Update dependency com.squareup.okio:okio-bom to v3.16.0 (#2520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 00:35:57 +00:00
renovate[bot] ec3a962ec8 Update dependency com.squareup.logcat:logcat to v0.4 (#2519)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 13:56:37 +00:00
FooIbar 348813109b Clean up context parameters 2025-07-29 21:46:57 +08:00
renovate[bot] 59598094df Update kotlin monorepo to v2.2.20-Beta2 (#2517)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 10:18:22 +00:00
renovate[bot] 8b6ae59eda Update dependency io.ktor:ktor-client-okhttp to v3.2.3 (#2516)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 10:17:55 +00:00
FooIbar b3d8653882 Speed up dependency downloading 2025-07-29 18:17:42 +08:00
renovate[bot] 719d1ebbb8 Update xmlutil to v0.91.2 (#2514)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 00:21:18 +00:00
FooIbar a23f902e9a Revert "[no ci] Allow blank issue"
This reverts commit 24e36b6283.
2025-07-28 20:25:31 +08:00
renovate[bot] 79559635e1 Lock file maintenance (#2512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 03:06:58 +00:00
FooIbar c57a4e4132 Kotlin 2.2.20-Beta1 and remove custom impl 2025-07-26 23:55:25 +08:00
renovate[bot] c6f7d9d869 Update dependency com.squareup.logcat:logcat to v0.3 (#2509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-25 08:47:54 +00:00
renovate[bot] 9fcddd06e4 Update dependency com.materialkolor:material-kolor to v3.0.1 (#2508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-24 20:54:47 +00:00
FooIbar 3526a2b0e9 [no ci] Add comment about KSP version check 2025-07-24 22:58:06 +08:00
FooIbar 56187aa4dc Prepare for next iteration
(cherry picked from commit 2d02eda9e3)
2025-07-23 23:25:15 +08:00
21 changed files with 67 additions and 72 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
blank_issues_enabled: false
+7
View File
@@ -1,5 +1,12 @@
# 变更日志
## [1.14.1] - 2025-07-31
### 改进
* 更新 GitHub 访问令牌
## [1.14.0] - 2025-07-23
### 重大变更
+2 -1
View File
@@ -61,7 +61,7 @@ android {
defaultConfig {
applicationId = "moe.tarsin.ehviewer"
versionCode = 180063
versionName = "1.14.0"
versionName = "1.14.1"
// versionNameSuffix = "-SNAPSHOT"
buildConfigField("String", "RAW_VERSION_NAME", "\"$versionName${versionNameSuffix.orEmpty()}\"")
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
@@ -284,6 +284,7 @@ kotlin {
)
freeCompilerArgs.addAll(
"-Xcontext-parameters",
"-Xwhen-expressions=indy",
"-Xannotation-default-target=param-property",
)
}
@@ -82,7 +82,7 @@ object EhTagDatabase : CoroutineScope {
data class Tag(val tag: String, val hint: String?, val score: Float)
context(ctx: Context)
context(_: Context)
fun suggestion(rawKeyword: String, expectTranslate: Boolean): List<Tag> {
val keyword = PREFIXES.fold(rawKeyword) { kwd, pfx -> kwd.removePrefix(pfx) }
if (!initialized || keyword.isEmpty()) return emptyList()
@@ -50,19 +50,19 @@ import com.hippo.ehviewer.ktbuilder.execute
import com.hippo.ehviewer.ktbuilder.imageRequest
import com.hippo.ehviewer.util.isAtLeastP
import com.hippo.ehviewer.util.isAtLeastU
import com.hippo.ehviewer.util.updateAndGet
import com.hippo.files.openFileDescriptor
import com.hippo.files.toUri
import java.nio.ByteBuffer
import kotlin.concurrent.atomics.AtomicInt
import kotlin.concurrent.atomics.decrementAndFetch
import kotlin.concurrent.atomics.updateAndFetch
import okio.Path
import splitties.init.appCtx
class Image private constructor(image: CoilImage, private val src: ImageSource) {
val refcnt = AtomicInt(1)
fun pin() = refcnt.updateAndGet { if (it != 0) it + 1 else 0 } != 0
fun pin() = refcnt.updateAndFetch { if (it != 0) it + 1 else 0 } != 0
fun unpin() = (refcnt.decrementAndFetch() == 0).also { if (it) recycle() }
@@ -114,7 +114,7 @@ suspend fun keepNoMediaFileStatus(downloadDir: Path = downloadLocation) {
fun getFavoriteIcon(favorited: Boolean) = if (favorited) Icons.Default.Favorite else Icons.Default.FavoriteBorder
context(_: DialogState, context: MainActivity)
context(_: DialogState, _: MainActivity)
suspend fun startDownload(forceDefault: Boolean, vararg galleryInfos: BaseGalleryInfo) {
if (isAtLeastT) {
requestPermission(Manifest.permission.POST_NOTIFICATIONS)
@@ -79,7 +79,7 @@ operator fun PaddingValues.plus(r: PaddingValues) = object : PaddingValues {
}
@Composable
context(_: CoroutineScope, ctx: Context)
context(_: CoroutineScope, _: Context)
fun GalleryList(
modifier: Modifier = Modifier,
data: LazyPagingItems<BaseGalleryInfo>,
@@ -377,7 +377,7 @@ fun ReaderScreen(pageLoader: PageLoader, info: BaseGalleryInfo?) {
}
}
context(ctx: Context, state: DialogState, nav: DestinationsNavigator)
context(_: Context, _: DialogState, nav: DestinationsNavigator)
suspend inline fun <T> usePageLoader(args: ReaderScreenArgs, crossinline block: suspend (PageLoader) -> T) = when (args) {
is ReaderScreenArgs.Gallery -> {
val info = args.info
@@ -829,7 +829,7 @@ private fun GalleryDetail.collectPreviewItems() = rememberInVM(previewList) {
}.flow.cachedIn(viewModelScope)
}.collectAsLazyPagingItems()
context(ctx: Context)
context(_: Context)
private fun LazyGridScope.galleryPreview(detail: GalleryDetail, data: LazyPagingItems<GalleryPreview>, onClick: (Int) -> Unit) {
val isV2Thumb = detail.previewList.first() is V2GalleryPreview
items(
@@ -25,7 +25,7 @@ private fun urlToDestination(url: String): Direction? {
}
@MainThread
context(nav: DestinationsNavigator)
context(_: DestinationsNavigator)
fun navWithUrl(url: String): Boolean {
val dest = urlToDestination(url) ?: return false
navigate(dest)
@@ -182,7 +182,7 @@ suspend fun <R> awaitResult(
)
}
context(ctx: Context, state: DialogState)
context(_: Context, _: DialogState)
suspend fun awaitSelectTags(): List<String> = dialog { cont ->
val selected = remember { mutableStateListOf<String>() }
val state = rememberTextFieldState()
@@ -109,8 +109,8 @@ private suspend inline fun ghStatement(
private val GithubTokenParts = arrayOf(
"github",
"pat",
"11A4H2ACI0XXTRsYkt1Mps",
"uJ5n8UbLv20j6Ue4k1x25Z7u63EaCdDNYooxSeI4GJaQYKXWDZEtTmDVwnh",
"11A4H2ACI0iGDuL1O6wPYW",
"OTFg8xaCNUwR1NHaJE1AT3LoYPfz6bouI7E7ReLf8GjIRFHCL5UsHL9EnWP",
)
data class Release(
@@ -1,28 +0,0 @@
package com.hippo.ehviewer.util
import kotlin.concurrent.atomics.AtomicInt
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
inline fun AtomicInt.loop(action: (Int) -> Unit): Nothing {
contract { callsInPlace(action, InvocationKind.AT_LEAST_ONCE) }
do {
action(load())
} while (true)
}
inline fun <R> AtomicInt.update(function: (Int) -> Int, transform: (old: Int, new: Int) -> R): R {
contract {
callsInPlace(function, InvocationKind.AT_LEAST_ONCE)
callsInPlace(transform, InvocationKind.AT_MOST_ONCE)
}
loop { cur ->
val upd = function(cur)
if (compareAndSet(cur, upd)) return transform(cur, upd)
}
}
inline fun AtomicInt.updateAndGet(function: (Int) -> Int): Int {
contract { callsInPlace(function, InvocationKind.AT_LEAST_ONCE) }
return update(function) { _, new -> new }
}
@@ -39,7 +39,7 @@ fun copyTextToClipboard(text: CharSequence?, isSensitive: Boolean) {
)
}
context(ctx: Context)
context(_: Context)
fun addTextToClipboard(text: CharSequence?, useToast: Boolean = false) {
copyTextToClipboard(text, false)
// Avoid double notify user since system have done that on Tiramisu above
@@ -46,7 +46,7 @@ private val lifecycle: Lifecycle
}
}
context(ctx: Context)
context(_: Context)
suspend fun <I, O> awaitActivityResult(contract: ActivityResultContract<I, O>, input: I): O {
val key = "activity_rq#${atomicInteger.fetchAndIncrement()}"
var launcher: ActivityResultLauncher<I>? = null
@@ -39,7 +39,7 @@ fun string(@StringRes id: Int, vararg args: Any?) = ctx.getString(id, *args)
context(activity: MainActivity)
fun tip(message: String, useToast: Boolean = false) = activity.showTip(message, useToast)
context(activity: MainActivity)
context(_: MainActivity)
fun tip(@StringRes id: Int, useToast: Boolean = false) = tip(string(id), useToast)
context(state: SnackbarHostState)
@@ -13,5 +13,5 @@ inline fun <R> runSuspendCatching(block: () -> R) = runCatching(block).except<R,
inline fun <T, R> T.runSuspendCatching(block: T.() -> R) = runCatching(block).except<R, CancellationException>()
context(state: SnackbarHostState, scope: CoroutineScope)
context(_: SnackbarHostState, _: CoroutineScope)
inline fun <R> runSwallowingWithUI(block: () -> R) = runSuspendCatching(block).onFailure { e -> launch { snackbar(e.displayString()) } }
+14 -14
View File
@@ -614,9 +614,9 @@ dependencies = [
[[package]]
name = "hyper-util"
version = "0.1.15"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df"
checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"
dependencies = [
"base64",
"bytes",
@@ -792,9 +792,9 @@ dependencies = [
[[package]]
name = "io-uring"
version = "0.7.8"
version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
dependencies = [
"bitflags",
"cfg-if",
@@ -1334,9 +1334,9 @@ dependencies = [
[[package]]
name = "rustc-demangle"
version = "0.1.25"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f"
checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
[[package]]
name = "rustix"
@@ -1353,9 +1353,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.29"
version = "0.23.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1"
checksum = "069a8df149a16b1a12dcc31497c3396a173844be3cac4bd40c9e7671fef96671"
dependencies = [
"once_cell",
"rustls-pki-types",
@@ -1549,12 +1549,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "socket2"
version = "0.5.10"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
dependencies = [
"libc",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -1691,9 +1691,9 @@ source = "git+https://github.com/y21/tl.git?rev=13ed128e35ce04c4f16c41cb1e38347d
[[package]]
name = "tokio"
version = "1.46.1"
version = "1.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17"
checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35"
dependencies = [
"backtrace",
"bytes",
@@ -1704,7 +1704,7 @@ dependencies = [
"slab",
"socket2",
"tokio-macros",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
+2
View File
@@ -21,4 +21,6 @@ org.gradle.configuration-cache=true
android.useAndroidX=true
android.enableAppCompileTimeRClass=true
android.r8.integratedResourceShrinking=true
# https://github.com/google/ksp/issues/2375
ksp.version.check=false
+12 -12
View File
@@ -5,33 +5,33 @@ agp = "8.11.1"
androidx-activity = "1.10.1"
androidx-appcompat = "1.7.1"
androidx-biometric = "1.4.0-alpha04"
androidx-browser = "1.8.0"
androidx-browser = "1.9.0"
androidx-core = "1.16.0"
androidx-core-splashscreen = "1.2.0-rc01"
androidx-datastore = "1.1.7"
androidx-lifecycle = "2.9.2"
androidx-paging = "3.3.6"
androidx-room = "2.7.2"
androidx-work = "2.10.2"
androidx-work = "2.10.3"
arrow = "2.1.2"
coil = "3.3.0"
compose-bom = "2025.07.00"
compose-bom = "2025.07.01"
compose-destinations = "2.2.0"
compose-preference = "2.1.0"
kotlin = "2.2.0"
kotlin = "2.2.20-Beta2"
kotlinx-coroutines = "1.10.2"
kotlinx-datetime = "0.7.1"
kotlinx-serialization = "1.9.0"
ksp = "2.2.0-2.0.2"
ktor = "3.2.2"
ksp = "2.2.20-Beta1-2.0.2"
ktor = "3.2.3"
okhttp = "5.1.0"
okio = "3.15.0"
okio = "3.16.0"
splitties = "3.0.0"
telephoto = "0.15.1"
xmlutil = "0.91.1"
junit = "1.2.1"
xmlutil = "0.91.2"
junit = "1.3.0"
uiautomator = "2.4.0-alpha05"
benchmark = "1.4.0-rc01"
benchmark = "1.4.0"
profileinstaller = "1.4.1"
[libraries]
@@ -82,7 +82,7 @@ compose-destinations-compiler = { module = "io.github.raamcosta.compose-destinat
compose-preference = { module = "me.zhanghai.compose.preference:preference", version.ref = "compose-preference" }
material-motion-core = "io.github.fornewid:material-motion-compose-core:2.0.1"
material-kolor = "com.materialkolor:material-kolor:3.0.0"
material-kolor = "com.materialkolor:material-kolor:3.0.1"
desugar = "com.android.tools:desugar_jdk_libs:2.1.5"
@@ -96,7 +96,7 @@ ktlint = "com.pinterest.ktlint:ktlint-cli:1.7.1"
okhttp-bom = { module = "com.squareup.okhttp3:okhttp-bom", version.ref = "okhttp" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
logcat = "com.squareup.logcat:logcat:0.2.3"
logcat = "com.squareup.logcat:logcat:0.4"
okio-bom = { module = "com.squareup.okio:okio-bom", version.ref = "okio" }
+14 -2
View File
@@ -1,7 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
}
}
@@ -9,7 +15,13 @@ pluginManagement {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
}
}