Skip to content

Commit

Permalink
fix: Use remember with transfer as a key to force the recompute for e…
Browse files Browse the repository at this point in the history
…very different transfer
  • Loading branch information
tevincent committed Nov 14, 2024
1 parent d33aec7 commit c601f1c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewLightAndDark
@Composable
fun TransferInfo(transfer: TransferUi) {

val filesCount = transfer.files.count()
val downloadedCount by remember { derivedStateOf { transfer.downloadLimit - transfer.downloadLeft } }
val filesCount by remember(transfer) { derivedStateOf { transfer.files.count() } }
val downloadedCount by remember(transfer) { derivedStateOf { transfer.downloadLimit - transfer.downloadLeft } }

Row(verticalAlignment = Alignment.CenterVertically) {
Icon(
Expand Down

0 comments on commit c601f1c

Please sign in to comment.