From 403bbb5d112665a4382425a7d35402ec797b8c1a Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Thu, 17 Oct 2024 15:19:08 +0200 Subject: [PATCH] Fix enabled state not updating when progress nullability changes --- .../java/com/infomaniak/swisstransfer/ui/components/Buttons.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt index 5e6515193..8ec7a013d 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt @@ -110,7 +110,7 @@ private fun CoreButton( onClick: () -> Unit, imageVector: ImageVector?, ) { - val isEnabled by remember { derivedStateOf { enabled() && !showIndeterminateProgress() && progress == null } } + val isEnabled by remember(progress) { derivedStateOf { enabled() && !showIndeterminateProgress() && progress == null } } val buttonColors = style.buttonColors() Button(