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

Commit

Permalink
Fix issue 3492 (#3493)
Browse files Browse the repository at this point in the history
* issue-fix-3492

* issue-fix-3492
  • Loading branch information
shamim-emon authored Sep 11, 2024
1 parent 7773e4e commit 6231cf5
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 6231cf5

Please sign in to comment.