From 209c7d1c94e68c3bcb474c8fb028d888eb0d9d0a Mon Sep 17 00:00:00 2001 From: Isabel Martin Date: Thu, 5 Sep 2024 12:45:48 -0700 Subject: [PATCH] MBL-1696: AddOns add button lost state (#2120) --- .../ui/activities/compose/projectpage/AddOnsContainer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/kickstarter/ui/activities/compose/projectpage/AddOnsContainer.kt b/app/src/main/java/com/kickstarter/ui/activities/compose/projectpage/AddOnsContainer.kt index 99be035203..5c5f2c94db 100644 --- a/app/src/main/java/com/kickstarter/ui/activities/compose/projectpage/AddOnsContainer.kt +++ b/app/src/main/java/com/kickstarter/ui/activities/compose/projectpage/AddOnsContainer.kt @@ -19,7 +19,7 @@ import androidx.compose.material.Text import androidx.compose.runtime.Composable 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 @@ -75,7 +75,7 @@ fun AddOnsContainer( quantity: Int = 0 ) { - var count by remember { mutableStateOf(quantity) } + var count by rememberSaveable { mutableStateOf(quantity) } Card( modifier = Modifier.fillMaxWidth(),