Skip to content

Commit

Permalink
fix: targetValue changed from remember to rememberSaveable
Browse files Browse the repository at this point in the history
  • Loading branch information
rocoand committed Sep 8, 2024
1 parent e4ac971 commit 7411bc8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -31,7 +31,7 @@ internal fun ContributorsCountItem(
totalContributor: Int,
modifier: Modifier = Modifier,
) {
var targetValue by remember { mutableStateOf(0) }
var targetValue by rememberSaveable { mutableStateOf(0) }
val animatedTotalContributor by animateIntAsState(
targetValue = targetValue,
animationSpec = tween(
Expand Down

0 comments on commit 7411bc8

Please sign in to comment.