From 421952742884c3de5363db59fcc9e2a67530e9fa Mon Sep 17 00:00:00 2001 From: meyou <2636699780@qq.com> Date: Tue, 19 May 2026 23:20:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A2=84=E6=B5=8B?= =?UTF-8?q?=E6=80=A7=E8=BF=94=E5=9B=9E=E6=89=8B=E5=8A=BF=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E5=92=8C=E7=BB=93=E6=9D=9F=E9=97=AA=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 enabled 条件中的 backProgress == 0f,该条件在手势开始时 会立即禁用 handler 导致系统直接执行返回 - 将 handleBack 结尾的 snapTo(0f) 改为 animateTo(0f, tween(100)) 避免进度瞬间跳变引起的闪屏 --- shared/src/commonMain/kotlin/plus/rua/project/App.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/App.kt b/shared/src/commonMain/kotlin/plus/rua/project/App.kt index 4608a65..730d34e 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/App.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/App.kt @@ -95,7 +95,7 @@ fun App() { Screen.Licenses -> Screen.About else -> currentScreen } - backAnimProgress.snapTo(0f) + backAnimProgress.animateTo(0f, tween(100, easing = FastOutSlowInEasing)) } } @@ -186,7 +186,7 @@ fun App() { // 预测性返回手势 if (currentScreen != Screen.Main) { PredictiveBackHandler( - enabled = backProgress == 0f && !backAnimProgress.isRunning && forwardTarget == null, + enabled = !backAnimProgress.isRunning && forwardTarget == null, onProgress = { backProgress = it }, onBack = handleBack, onCancel = handleCancel