This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun PlanRouteComponent( | |
| viewModel: PlanFlowViewModel = koinViewModel(), | |
| planName: String, | |
| subPlanName: String? = null, | |
| onClose: () -> Unit | |
| ) { | |
| val backStack = viewModel.backStack | |
| val planUiState by viewModel.planDataUiState.collectAsStateWithLifecycle() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun PrayersRouteComponent( | |
| onShowNavigationBar: (Boolean) -> Unit = {} | |
| ) { | |
| val backStack = rememberNavBackStack<PrayersSubRoute>(PrayersSubRoute.PrayersRoute) | |
| NavDisplay( | |
| backStack = backStack, | |
| onBack = { keysToRemove -> repeat(keysToRemove) { backStack.removeLastOrNull() } }, | |
| entryDecorators = listOf( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ChapletFlowViewModel( | |
| private val challengeRepository: ChallengeRepository | |
| ) : ViewModel() { | |
| private val _shouldCloseFlow = MutableSharedFlow<Boolean>() | |
| val shouldCloseFlow: SharedFlow<Boolean> = _shouldCloseFlow | |
| val backStack = mutableStateListOf<ChapletRoutes>() | |
| init { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun ChapletFlowRouteComponent( | |
| viewModel: ChapletFlowViewModel = koinViewModel(), | |
| chapletName: String, | |
| onClose: () -> Unit | |
| ) { | |
| val backStack = viewModel.backStack | |
| LaunchedEffect(Unit) { | |
| viewModel.shouldCloseFlow.collect { shouldClose -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Serializable | |
| sealed interface HomeSubRoute : NavKey { | |
| @Serializable | |
| data object HomeRoute : HomeSubRoute | |
| @Serializable | |
| data object LiturgyRoute : HomeSubRoute | |
| @Serializable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val backStack = rememberNavBackStack<HomeSubRoute>(HomeSubRoute.HomeRoute) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun HomeRouteComponent( | |
| onShowNavigationBar: (Boolean) -> Unit = {} | |
| ) { | |
| val backStack = rememberNavBackStack<HomeSubRoute>(HomeSubRoute.HomeRoute) | |
| NavDisplay( | |
| backStack = backStack, | |
| onBack = { keysToRemove -> repeat(keysToRemove) { backStack.removeLastOrNull() } }, | |
| entryDecorators = listOf( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun MainContent() { | |
| val bottomBarVisibleState = remember { mutableStateOf(true) } | |
| val backStack = rememberNavBackStack<AppRoutes>(AppRoutes.Home) | |
| val onShowNavigationBar: (Boolean) -> Unit = { show -> | |
| bottomBarVisibleState.value = show | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.coordinatorlayout.widget.CoordinatorLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| android:id="@+id/root" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <androidx.coordinatorlayout.widget.CoordinatorLayout | |
| android:id="@+id/main_coordinator" |
NewerOlder