From 55000f64c9b42593f1ea4b1e2b02b5669317ef24 Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 25 May 2026 16:48:09 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20WeekPager=20alpha()=20=E2=86=92=20graph?= =?UTF-8?q?icsLayer=20=E9=81=BF=E5=85=8D=E6=BB=91=E5=8A=A8=E9=87=8D?= =?UTF-8?q?=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 与 CalendarPager 同样的问题:周视图滑动时 alpha 每帧变化触发重组。 Co-Authored-By: Claude Opus 4.7 (1M context) --- core/src/main/kotlin/plus/rua/project/ui/WeekPager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/plus/rua/project/ui/WeekPager.kt b/core/src/main/kotlin/plus/rua/project/ui/WeekPager.kt index 602e402..42d4652 100644 --- a/core/src/main/kotlin/plus/rua/project/ui/WeekPager.kt +++ b/core/src/main/kotlin/plus/rua/project/ui/WeekPager.kt @@ -13,7 +13,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.alpha +import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.unit.dp import kotlinx.coroutines.flow.drop import kotlinx.datetime.DatePeriod @@ -87,7 +87,7 @@ fun WeekPager( val weekMonday = pageToWeekMonday(page, initialWeekMonday) Row( modifier = Modifier - .alpha(alpha) + .graphicsLayer { this.alpha = alpha } .fillMaxWidth() .padding(vertical = ROW_PADDING_DP.dp) ) {