Skip to content

Commit

Permalink
fix: Data in TransferInfo now correctly update when opening another T…
Browse files Browse the repository at this point in the history
…ransfer (#295)
  • Loading branch information
KevinBoulongne authored Jan 2, 2025
2 parents 1b60e1d + b006db5 commit 9b1255c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ fun TransferDetailsScreen(
transferDetailsViewModel.loadTransfer(transferUuid)
}

when (val state = uiState) {
when (uiState) {
is Delete -> navigateBack?.invoke()
is Success -> TransferDetailsScreen(
transferUrl = transferDetailsViewModel.getTransferUrl(transferUuid),
direction = direction,
navigateBack = navigateBack,
getTransfer = { state.transfer },
downloadFiles = { transferDetailsViewModel.startDownloadingAllFiles(state.transfer) },
getTransfer = { (uiState as Success).transfer },
downloadFiles = { transferDetailsViewModel.startDownloadingAllFiles((uiState as Success).transfer) },
getCheckedFiles = { transferDetailsViewModel.checkedFiles },
clearCheckedFiles = { transferDetailsViewModel.checkedFiles.clear() },
setFileCheckStatus = { fileUid, isChecked ->
Expand All @@ -97,7 +97,7 @@ private fun TransferDetailsScreen(
getTransfer: () -> TransferUi,
downloadFiles: () -> Unit,
getCheckedFiles: () -> SnapshotStateMap<String, Boolean>,
clearCheckedFiles: () -> Unit,
clearCheckedFiles: () -> Unit, // TODO: Unused for now, to be implemented or deleted someday
setFileCheckStatus: (String, Boolean) -> Unit,
) {

Expand Down

0 comments on commit 9b1255c

Please sign in to comment.