From b73a041b83bb93d0e40ceb458d0d469155ab4578 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Wed, 14 Aug 2024 18:02:19 +0200 Subject: [PATCH] fix: Hide navigation suite if needed --- .../main/components/AppNavigationSuiteScaffold.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt index 4a4baf198..e001b33a3 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt @@ -65,10 +65,14 @@ fun AppNavigationSuiteScaffold( Surface(color = SwissTransferTheme.materialColors.background) { NavigationSuiteScaffoldLayout( navigationSuite = { - if (layoutType == NavigationSuiteType.NavigationBar) { - AppNavigationBar(navigationItems, currentDestination, navigateToSelectedItem) - } else { - AppNavigationRail(navigationItems, currentDestination, navigateToSelectedItem) + when (layoutType) { + NavigationSuiteType.None -> Unit + NavigationSuiteType.NavigationBar -> { + AppNavigationBar(navigationItems, currentDestination, navigateToSelectedItem) + } + else -> { + AppNavigationRail(navigationItems, currentDestination, navigateToSelectedItem) + } } }, layoutType = layoutType,