File tree Expand file tree Collapse file tree
app/src/main/java/com/cornellappdev/uplift/ui/components/general Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ import androidx.compose.ui.graphics.drawscope.withTransform
1717import com.cornellappdev.uplift.ui.theme.ConfettiColors
1818import kotlinx.coroutines.delay
1919import com.cornellappdev.uplift.ui.viewmodels.profile.ConfettiViewModel
20- import com.google.android.play.core.integrity.x
21- import com.google.android.play.integrity.internal.y
2220import kotlin.math.cos
2321import kotlin.math.sin
2422import kotlin.random.Random
@@ -85,8 +83,8 @@ fun ConfettiBurst(
8583
8684 var started by remember(uiState.showing) { mutableStateOf(false ) }
8785
88- LaunchedEffect (uiState.showing ) {
89- if (uiState.showing) started = true
86+ LaunchedEffect (Unit ) {
87+ started = true
9088 }
9189
9290 // Progress 0 to 1 over 1.2s, used as time 't' in the physics below
@@ -126,11 +124,9 @@ fun ConfettiBurst(
126124 }
127125
128126
129- LaunchedEffect (uiState.showing) {
130- if (uiState.showing) {
131- delay(1300 )
132- confettiViewModel.onAnimationFinished()
133- }
127+ LaunchedEffect (Unit ) {
128+ delay(1300 )
129+ confettiViewModel.onAnimationFinished()
134130 }
135131
136132 // Renders ballistic motion + fade out for each particle
You can’t perform that action at this time.
0 commit comments