commit
						7c0e15cb9d
					
				
					 6 changed files with 11 additions and 12 deletions
				
			
		|  | @ -116,11 +116,11 @@ fun NavGraphBuilder.studeezGraph(appState: StudeezAppstate) { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     composable(StudeezDestinations.TIMER_OVERVIEW_SCREEN) { |     composable(StudeezDestinations.TIMER_OVERVIEW_SCREEN) { | ||||||
|         TimerOverviewScreen(openAndPopUp) |         TimerOverviewScreen(open, openAndPopUp) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     composable(StudeezDestinations.SESSION_SCREEN) { |     composable(StudeezDestinations.SESSION_SCREEN) { | ||||||
|         SessionScreen(openAndPopUp) |         SessionScreen(open, openAndPopUp) | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     // TODO Timers screen |     // TODO Timers screen | ||||||
|  |  | ||||||
|  | @ -22,7 +22,7 @@ fun PrimaryScreenTemplate( | ||||||
|     title: String, |     title: String, | ||||||
|     open: (String) -> Unit, |     open: (String) -> Unit, | ||||||
|     openAndPopUp: (String, String) -> Unit, |     openAndPopUp: (String, String) -> Unit, | ||||||
|     action: @Composable RowScope.() -> Unit, |     action: @Composable RowScope.() -> Unit = {}, | ||||||
|     content: @Composable (PaddingValues) -> Unit |     content: @Composable (PaddingValues) -> Unit | ||||||
| ) { | ) { | ||||||
|     val scaffoldState: ScaffoldState = rememberScaffoldState() |     val scaffoldState: ScaffoldState = rememberScaffoldState() | ||||||
|  |  | ||||||
|  | @ -19,13 +19,8 @@ class DrawerViewModel @Inject constructor( | ||||||
|         open(HOME_SCREEN) |         open(HOME_SCREEN) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     fun onTimersClick(open: (String) -> Unit) { |     fun onTimersClick(openAndPopup: (String) -> Unit) { | ||||||
|         // TODO |         openAndPopup(StudeezDestinations.TIMER_OVERVIEW_SCREEN) | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     fun onTimersClick(openAndPopup: (String, String) -> Unit) { |  | ||||||
|         // TODO is niet altijd het homescreen |  | ||||||
|         openAndPopup(StudeezDestinations.TIMER_OVERVIEW_SCREEN, StudeezDestinations.HOME_SCREEN) |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     fun onSettingsClick(open: (String) -> Unit) { |     fun onSettingsClick(open: (String) -> Unit) { | ||||||
|  |  | ||||||
|  | @ -15,8 +15,8 @@ class HomeViewModel @Inject constructor( | ||||||
|     logService: LogService |     logService: LogService | ||||||
| ) : StudeezViewModel(logService) { | ) : StudeezViewModel(logService) { | ||||||
| 
 | 
 | ||||||
|     fun onStartSessionClick(openAndPopUp: (String, String) -> Unit) { |     fun onStartSessionClick(openAndPopUp: (String) -> Unit) { | ||||||
|         openAndPopUp(StudeezDestinations.SESSION_SCREEN, StudeezDestinations.HOME_SCREEN) |         openAndPopUp(StudeezDestinations.SESSION_SCREEN) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     fun onLogoutClick(openAndPopup: (String, String) -> Unit) { |     fun onLogoutClick(openAndPopup: (String, String) -> Unit) { | ||||||
|  |  | ||||||
|  | @ -18,11 +18,13 @@ import kotlinx.coroutines.delay | ||||||
| 
 | 
 | ||||||
| @Composable | @Composable | ||||||
| fun SessionScreen( | fun SessionScreen( | ||||||
|  |     open: (String) -> Unit, | ||||||
|     openAndPopUp: (String, String) -> Unit, |     openAndPopUp: (String, String) -> Unit, | ||||||
|     viewModel: SessionViewModel = hiltViewModel() |     viewModel: SessionViewModel = hiltViewModel() | ||||||
| ) { | ) { | ||||||
|     PrimaryScreenTemplate( |     PrimaryScreenTemplate( | ||||||
|         title = resources().getString(R.string.start_session), |         title = resources().getString(R.string.start_session), | ||||||
|  |         open = open, | ||||||
|         openAndPopUp = openAndPopUp |         openAndPopUp = openAndPopUp | ||||||
|     ) { |     ) { | ||||||
|         Timer(viewModel) |         Timer(viewModel) | ||||||
|  |  | ||||||
|  | @ -27,6 +27,7 @@ import be.ugent.sel.studeez.resources | ||||||
| 
 | 
 | ||||||
| @Composable | @Composable | ||||||
| fun TimerOverviewScreen( | fun TimerOverviewScreen( | ||||||
|  |     open: (String) -> Unit, | ||||||
|     openAndPopUp: (String, String) -> Unit, |     openAndPopUp: (String, String) -> Unit, | ||||||
|     viewModel: TimerOverviewViewModel = hiltViewModel() |     viewModel: TimerOverviewViewModel = hiltViewModel() | ||||||
| ) { | ) { | ||||||
|  | @ -35,6 +36,7 @@ fun TimerOverviewScreen( | ||||||
| 
 | 
 | ||||||
|     PrimaryScreenTemplate( |     PrimaryScreenTemplate( | ||||||
|         title = resources().getString(R.string.timers), |         title = resources().getString(R.string.timers), | ||||||
|  |         open = open, | ||||||
|         openAndPopUp = openAndPopUp |         openAndPopUp = openAndPopUp | ||||||
|     ) { |     ) { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 lbarraga
						lbarraga