Skip to content

Commit

Permalink
Add onClose and navigateBack callback in FilesDetailsScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Oct 23, 2024
1 parent 1f2f0b2 commit 04fcff0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ fun FilesDetailsScreen(
filesList: () -> List<FileUi>,
withSpaceLeft: Boolean,
onFileRemoved: ((uuid: String) -> Unit)? = null,
onCloseClicked: (() -> Unit),
navigateBack: (() -> Unit),
) {
val files = filesList()
Column {
SwissTransferTopAppBar(
title = title,
titleRes = R.string.importFilesScreenTitle,
navigationMenu = TopAppBarButton.backButton {},
TopAppBarButton.closeButton {},
navigationMenu = TopAppBarButton.backButton { navigateBack() },
TopAppBarButton.closeButton { onCloseClicked() },
)

FilesSize(files, withSpaceLeft)
Expand All @@ -73,6 +75,8 @@ private fun FilesDetailsScreenPreview(@PreviewParameter(FileUiListPreviewParamet
filesList = { files },
withSpaceLeft = true,
onFileRemoved = { },
onCloseClicked = { },
navigateBack = { },
)
}
}
Expand Down

0 comments on commit 04fcff0

Please sign in to comment.