get selectedtimer from repository

This commit is contained in:
Lukas Barragan Torres 2023-04-18 10:40:56 +02:00
parent b2d010ff3f
commit 42eb9cf208

View file

@ -1,20 +1,19 @@
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.domain.LogService
import be.ugent.sel.studeez.screens.StudeezViewModel
import be.ugent.sel.studeez.data.SelectedTimerRepo
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@HiltViewModel
class SessionViewModel @Inject constructor(
private val selectedTimerRepo: SelectedTimerRepo,
logService: LogService
) : StudeezViewModel(logService) {
private val timer: FunctionalTimer = FunctionalPomodoroTimer(15, 5, 3)
fun getTimer() : FunctionalTimer {
return timer
return selectedTimerRepo.selectedTimer!!
}
}