Skip to content

Commit

Permalink
Remove bottom nav bar when relaunching tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintPatrck committed Apr 26, 2024
1 parent f39669e commit e559964
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.bitwarden.authenticator.ui.authenticator.feature.navbar.authenticator
import com.bitwarden.authenticator.ui.authenticator.feature.qrcodescan.navigateToQrCodeScanScreen
import com.bitwarden.authenticator.ui.authenticator.feature.search.navigateToSearch
import com.bitwarden.authenticator.ui.platform.feature.settings.export.navigateToExport
import com.bitwarden.authenticator.ui.platform.feature.tutorial.navigateToSettingsTutorial

const val AUTHENTICATOR_GRAPH_ROUTE = "authenticator_graph"

Expand Down Expand Up @@ -40,6 +41,7 @@ fun NavGraphBuilder.authenticatorGraph(
onNavigateToManualKeyEntry = { navController.navigateToManualCodeEntryScreen() },
onNavigateToEditItem = { navController.navigateToEditItem(itemId = it) },
onNavigateToExport = { navController.navigateToExport() },
onNavigateToTutorial = { navController.navigateToSettingsTutorial() }
)
itemListingGraph(
navController = navController,
Expand All @@ -57,6 +59,7 @@ fun NavGraphBuilder.authenticatorGraph(
navController.navigateToEditItem(itemId = it)
},
navigateToExport = { navController.navigateToExport() },
navigateToTutorial = { navController.navigateToSettingsTutorial() }
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fun NavGraphBuilder.itemListingGraph(
navigateToManualKeyEntry: () -> Unit,
navigateToEditItem: (String) -> Unit,
navigateToExport: () -> Unit,
navigateToTutorial: () -> Unit,
) {
navigation(
route = ITEM_LISTING_GRAPH_ROUTE,
Expand Down Expand Up @@ -60,6 +61,7 @@ fun NavGraphBuilder.itemListingGraph(
settingsGraph(
navController = navController,
onNavigateToExport = navigateToExport,
onNavigateToTutorial = navigateToTutorial,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fun NavGraphBuilder.authenticatorNavBarDestination(
onNavigateToManualKeyEntry: () -> Unit,
onNavigateToEditItem: (itemId: String) -> Unit,
onNavigateToExport: () -> Unit,
onNavigateToTutorial: () -> Unit,
) {
composableWithStayTransitions(
route = AUTHENTICATOR_NAV_BAR_ROUTE,
Expand All @@ -26,6 +27,7 @@ fun NavGraphBuilder.authenticatorNavBarDestination(
onNavigateToManualKeyEntry = onNavigateToManualKeyEntry,
onNavigateToEditItem = onNavigateToEditItem,
onNavigateToExport = onNavigateToExport,
onNavigateToTutorial = onNavigateToTutorial
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fun AuthenticatorNavBarScreen(
onNavigateToManualKeyEntry: () -> Unit,
onNavigateToEditItem: (itemId: String) -> Unit,
onNavigateToExport: () -> Unit,
onNavigateToTutorial: () -> Unit,
) {
EventsEffect(viewModel = viewModel) { event ->
navController.apply {
Expand Down Expand Up @@ -111,6 +112,7 @@ fun AuthenticatorNavBarScreen(
navigateToManualKeyEntry = onNavigateToManualKeyEntry,
navigateToEditItem = onNavigateToEditItem,
navigateToExport = onNavigateToExport,
navigateToTutorial = onNavigateToTutorial,
)
}

Expand All @@ -126,6 +128,7 @@ private fun AuthenticatorNavBarScaffold(
navigateToManualKeyEntry: () -> Unit,
navigateToEditItem: (itemId: String) -> Unit,
navigateToExport: () -> Unit,
navigateToTutorial: () -> Unit,
) {
BitwardenScaffold(
contentWindowInsets = ScaffoldDefaults.contentWindowInsets.exclude(WindowInsets.statusBars),
Expand Down Expand Up @@ -173,6 +176,7 @@ private fun AuthenticatorNavBarScaffold(
navigateToManualKeyEntry = navigateToManualKeyEntry,
navigateToEditItem = navigateToEditItem,
navigateToExport = navigateToExport,
navigateToTutorial = navigateToTutorial,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.navigation.NavOptions
import androidx.navigation.navigation
import com.bitwarden.authenticator.ui.platform.base.util.composableWithRootPushTransitions
import com.bitwarden.authenticator.ui.platform.feature.settings.export.exportDestination
import com.bitwarden.authenticator.ui.platform.feature.tutorial.navigateToSettingsTutorial
import com.bitwarden.authenticator.ui.platform.feature.tutorial.tutorialSettingsDestination

const val SETTINGS_GRAPH_ROUTE = "settings_graph"
Expand All @@ -18,6 +17,7 @@ private const val SETTINGS_ROUTE = "settings"
fun NavGraphBuilder.settingsGraph(
navController: NavController,
onNavigateToExport: () -> Unit,
onNavigateToTutorial: () -> Unit,
) {
navigation(
startDestination = SETTINGS_ROUTE,
Expand All @@ -27,7 +27,8 @@ fun NavGraphBuilder.settingsGraph(
route = SETTINGS_ROUTE
) {
SettingsScreen(
onNavigateToTutorial = { navController.navigateToSettingsTutorial() },
onNavigateToTutorial = onNavigateToTutorial,
//{ navController.navigateToSettingsTutorial() },
onNavigateToExport = onNavigateToExport,
)
}
Expand Down

0 comments on commit e559964

Please sign in to comment.