File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
feature/upload/src/main/java/com/sseotdabwa/buyornot/feature/upload/ui Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import androidx.compose.material3.Scaffold
3434import androidx.compose.material3.Surface
3535import androidx.compose.material3.Text
3636import androidx.compose.runtime.Composable
37+ import androidx.compose.runtime.derivedStateOf
3738import androidx.compose.runtime.getValue
3839import androidx.compose.runtime.mutableStateOf
3940import androidx.compose.runtime.remember
@@ -110,8 +111,13 @@ fun UploadScreen(
110111 selectedImageUri = uri
111112 }
112113
113- val isSubmitEnabled = selectedCategory != null && priceRaw.isNotEmpty() && selectedImageUri != null
114-
114+ val isSubmitEnabled by remember {
115+ derivedStateOf {
116+ selectedCategory != null &&
117+ priceRaw.isNotEmpty() &&
118+ selectedImageUri != null
119+ }
120+ }
115121 BackHandler {
116122 if (! showExitDialog) showExitDialog = true
117123 }
You can’t perform that action at this time.
0 commit comments