Skip to content

Commit

Permalink
refactor: Clean code before review
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Nov 28, 2024
1 parent 0458c62 commit 04d907b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ fun TransferItemList(
) {

val selectedTransferUuid = getSelectedTransferUuid()
val itemShape = CustomShapes.SMALL
val titleRes = when (direction) {
TransferDirection.SENT -> R.string.sentFilesTitle
TransferDirection.RECEIVED -> R.string.receivedFilesTitle
}
val itemShape = CustomShapes.SMALL

LazyColumn(
modifier = modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fun ReceivedScreen(
navigateToDetails = navigateToDetails,
getSelectedTransferUuid = getSelectedTransferUuid,
getTransfers = { transfers!! },
onSwiped = transfersViewModel::deleteSwipedTransfer,
onSwiped = transfersViewModel::deleteTransfer,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fun SentScreen(
navigateToDetails = navigateToDetails,
getSelectedTransferUuid = getSelectedTransferUuid,
getTransfers = { transfers!! },
onSwiped = transfersViewModel::deleteSwipedTransfer,
onSwiped = transfersViewModel::deleteTransfer,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TransfersViewModel @Inject constructor(
}
}

fun deleteSwipedTransfer(transferUuid: String) {
fun deleteTransfer(transferUuid: String) {
viewModelScope.launch(ioDispatcher) {
runCatching {
transferManager.deleteTransfer(transferUuid)
Expand Down

0 comments on commit 04d907b

Please sign in to comment.