diff --git a/screen/piechart/src/main/java/com/ivy/piechart/PieChartStatisticScreen.kt b/screen/piechart/src/main/java/com/ivy/piechart/PieChartStatisticScreen.kt index 31d1a21e18..02fe62665e 100644 --- a/screen/piechart/src/main/java/com/ivy/piechart/PieChartStatisticScreen.kt +++ b/screen/piechart/src/main/java/com/ivy/piechart/PieChartStatisticScreen.kt @@ -18,7 +18,6 @@ import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed -import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -61,6 +60,7 @@ import com.ivy.navigation.TransactionsScreen import com.ivy.navigation.navigation import com.ivy.navigation.screenScopedViewModel import com.ivy.ui.R +import com.ivy.ui.rememberScrollPositionListState import com.ivy.wallet.ui.theme.GradientGreen import com.ivy.wallet.ui.theme.Gray import com.ivy.wallet.ui.theme.Green @@ -111,7 +111,9 @@ private fun BoxWithConstraintsScope.UI( onEvent: (PieChartStatisticEvent) -> Unit = {} ) { val nav = navigation() - val lazyState = rememberLazyListState() + val lazyState = rememberScrollPositionListState( + key = "item_pie_chart_lazy_column" + ) val expanded = lazyState.firstVisibleItemIndex < 1 val percentExpanded by animateFloatAsState( targetValue = if (expanded) 1f else 0f,