Navigation fix.
This commit is contained in:
		
							parent
							
								
									b05d9d0cf3
								
							
						
					
					
						commit
						b28df77d19
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		
							
								
								
									
										2
									
								
								.idea/misc.xml
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.idea/misc.xml
									
										
									
										generated
									
									
									
								
							| 
						 | 
				
			
			@ -81,6 +81,8 @@
 | 
			
		|||
        <entry key="../../../../../layout/compose-model-1620400535629.xml" value="0.16300675675675674" />
 | 
			
		||||
        <entry key="../../../../../layout/compose-model-1620401962136.xml" value="0.28125" />
 | 
			
		||||
        <entry key="../../../../../layout/compose-model-1620402873003.xml" value="0.28125" />
 | 
			
		||||
        <entry key="../../../../../layout/compose-model-1620403048637.xml" value="0.28125" />
 | 
			
		||||
        <entry key="../../../../../layout/compose-model-1620403067126.xml" value="0.23514851485148514" />
 | 
			
		||||
        <entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2898148148148148" />
 | 
			
		||||
        <entry key="app/src/main/res/drawable/ic_baseline_local_library_24.xml" value="0.25462962962962965" />
 | 
			
		||||
        <entry key="app/src/main/res/drawable/ic_google.xml" value="0.2962962962962963" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,11 +2,13 @@ package com.pixelized.biblib.ui.composable.screen
 | 
			
		|||
 | 
			
		||||
import androidx.compose.animation.Crossfade
 | 
			
		||||
import androidx.compose.animation.core.tween
 | 
			
		||||
import androidx.compose.foundation.layout.Box
 | 
			
		||||
import androidx.compose.material.*
 | 
			
		||||
import androidx.compose.material.icons.Icons
 | 
			
		||||
import androidx.compose.material.icons.sharp.ArrowBack
 | 
			
		||||
import androidx.compose.material.icons.sharp.LocalLibrary
 | 
			
		||||
import androidx.compose.runtime.Composable
 | 
			
		||||
import androidx.compose.runtime.LaunchedEffect
 | 
			
		||||
import androidx.compose.runtime.getValue
 | 
			
		||||
import androidx.compose.runtime.livedata.observeAsState
 | 
			
		||||
import androidx.compose.ui.res.stringResource
 | 
			
		||||
| 
						 | 
				
			
			@ -49,6 +51,10 @@ fun MainScreenComposablePreview() {
 | 
			
		|||
fun MainScreenComposable(navigationViewModel: NavigationViewModel) {
 | 
			
		||||
    val page by navigationViewModel.page.observeAsState()
 | 
			
		||||
 | 
			
		||||
    LaunchedEffect(key1 = "MainScreen", block = {
 | 
			
		||||
        navigationViewModel.navigateTo(Page.HomePage)
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    Scaffold(
 | 
			
		||||
        topBar = { ToolbarComposable(navigationViewModel) },
 | 
			
		||||
    ) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue