get selectedtimer from repository
This commit is contained in:
		
							parent
							
								
									b2d010ff3f
								
							
						
					
					
						commit
						42eb9cf208
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -1,20 +1,19 @@ | ||||||
| package be.ugent.sel.studeez.screens.session | package be.ugent.sel.studeez.screens.session | ||||||
| 
 | 
 | ||||||
| import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalPomodoroTimer |  | ||||||
| import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalTimer | import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalTimer | ||||||
| import be.ugent.sel.studeez.domain.LogService | import be.ugent.sel.studeez.domain.LogService | ||||||
| import be.ugent.sel.studeez.screens.StudeezViewModel | import be.ugent.sel.studeez.screens.StudeezViewModel | ||||||
|  | import be.ugent.sel.studeez.data.SelectedTimerRepo | ||||||
| import dagger.hilt.android.lifecycle.HiltViewModel | import dagger.hilt.android.lifecycle.HiltViewModel | ||||||
| import javax.inject.Inject | import javax.inject.Inject | ||||||
| 
 | 
 | ||||||
| @HiltViewModel | @HiltViewModel | ||||||
| class SessionViewModel @Inject constructor( | class SessionViewModel @Inject constructor( | ||||||
|  |     private val selectedTimerRepo: SelectedTimerRepo, | ||||||
|     logService: LogService |     logService: LogService | ||||||
| ) : StudeezViewModel(logService) { | ) : StudeezViewModel(logService) { | ||||||
| 
 | 
 | ||||||
|     private val timer: FunctionalTimer = FunctionalPomodoroTimer(15, 5, 3) |  | ||||||
| 
 |  | ||||||
|     fun getTimer() : FunctionalTimer { |     fun getTimer() : FunctionalTimer { | ||||||
|         return timer |         return selectedTimerRepo.selectedTimer!! | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Reference in a new issue
	
	 Lukas Barragan Torres
						Lukas Barragan Torres