Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Fix issue 3492 #3493

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down