fix issues
This commit is contained in:
		
							parent
							
								
									0e45388242
								
							
						
					
					
						commit
						076381915d
					
				
					 6 changed files with 11 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -19,13 +19,8 @@ class DrawerViewModel @Inject constructor(
 | 
			
		|||
        open(HOME_SCREEN)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fun onTimersClick(open: (String) -> Unit) {
 | 
			
		||||
        // TODO
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fun onTimersClick(openAndPopup: (String, String) -> Unit) {
 | 
			
		||||
        // TODO is niet altijd het homescreen
 | 
			
		||||
        openAndPopup(StudeezDestinations.TIMER_OVERVIEW_SCREEN, StudeezDestinations.HOME_SCREEN)
 | 
			
		||||
    fun onTimersClick(openAndPopup: (String) -> Unit) {
 | 
			
		||||
        openAndPopup(StudeezDestinations.TIMER_OVERVIEW_SCREEN)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fun onSettingsClick(open: (String) -> Unit) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,8 +15,8 @@ class HomeViewModel @Inject constructor(
 | 
			
		|||
    logService: LogService
 | 
			
		||||
) : StudeezViewModel(logService) {
 | 
			
		||||
 | 
			
		||||
    fun onStartSessionClick(openAndPopUp: (String, String) -> Unit) {
 | 
			
		||||
        openAndPopUp(StudeezDestinations.SESSION_SCREEN, StudeezDestinations.HOME_SCREEN)
 | 
			
		||||
    fun onStartSessionClick(openAndPopUp: (String) -> Unit) {
 | 
			
		||||
        openAndPopUp(StudeezDestinations.SESSION_SCREEN)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fun onLogoutClick(openAndPopup: (String, String) -> Unit) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,11 +18,13 @@ import kotlinx.coroutines.delay
 | 
			
		|||
 | 
			
		||||
@Composable
 | 
			
		||||
fun SessionScreen(
 | 
			
		||||
    open: (String) -> Unit,
 | 
			
		||||
    openAndPopUp: (String, String) -> Unit,
 | 
			
		||||
    viewModel: SessionViewModel = hiltViewModel()
 | 
			
		||||
) {
 | 
			
		||||
    PrimaryScreenTemplate(
 | 
			
		||||
        title = resources().getString(R.string.start_session),
 | 
			
		||||
        open = open,
 | 
			
		||||
        openAndPopUp = openAndPopUp
 | 
			
		||||
    ) {
 | 
			
		||||
        Timer(viewModel)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,7 @@ import be.ugent.sel.studeez.resources
 | 
			
		|||
 | 
			
		||||
@Composable
 | 
			
		||||
fun TimerOverviewScreen(
 | 
			
		||||
    open: (String) -> Unit,
 | 
			
		||||
    openAndPopUp: (String, String) -> Unit,
 | 
			
		||||
    viewModel: TimerOverviewViewModel = hiltViewModel()
 | 
			
		||||
) {
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +36,7 @@ fun TimerOverviewScreen(
 | 
			
		|||
 | 
			
		||||
    PrimaryScreenTemplate(
 | 
			
		||||
        title = resources().getString(R.string.timers),
 | 
			
		||||
        open = open,
 | 
			
		||||
        openAndPopUp = openAndPopUp
 | 
			
		||||
    ) {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue