diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt index 381644576..83dd38a94 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt @@ -26,6 +26,7 @@ import androidx.compose.ui.res.stringResource import com.infomaniak.swisstransfer.R import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons import com.infomaniak.swisstransfer.ui.images.icons.Add +import com.infomaniak.swisstransfer.ui.images.icons.ArrowDownBar import com.infomaniak.swisstransfer.ui.images.icons.ArrowLeft import com.infomaniak.swisstransfer.ui.images.icons.Cross import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme @@ -80,6 +81,9 @@ data class TopAppBarButton( val closeButton: (onClick: () -> Unit) -> TopAppBarButton = { TopAppBarButton(AppIcons.Cross, R.string.contentDescriptionButtonClose, it) } + val downloadButton: (onClick: () -> Unit) -> TopAppBarButton = { + TopAppBarButton(AppIcons.ArrowDownBar, R.string.buttonDownload, it) + } } } @@ -92,6 +96,7 @@ private fun SwissTransferTopAppBarPreview() { navigationMenu = TopAppBarButton.backButton {}, TopAppBarButton(AppIcons.Add, R.string.appName) {}, TopAppBarButton.closeButton {}, + TopAppBarButton.downloadButton {}, ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt index 1d2c88fe1..778650715 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt @@ -81,6 +81,7 @@ fun TransferDetailsScreen( SwissTransferTopAppBar( title = Date(transfer.createdDateTimestamp).format(FORMAT_DATE_FULL), navigationMenu = TopAppBarButton.backButton(navigateBack ?: {}), + TopAppBarButton.downloadButton { /* TODO */ }, ) }, floatingActionButton = {},