This repository has been archived on 2026-05-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
weserplaner/app/src/main/java/com/denizk0461/studip/viewmodel/EventPageViewModel.kt
T

20 lines
632 B
Kotlin

package com.denizk0461.studip.viewmodel
import android.app.Application
import androidx.lifecycle.LiveData
import com.denizk0461.studip.model.StudIPEvent
/**
* View model for [com.denizk0461.studip.fragment.EventPageFragment]
*
* @param app reference to the app
*/
class EventPageViewModel(app: Application) : AppViewModel(app) {
/**
* Retrieves Stud.IP events for a specific day, ordered by their timeslots, then their IDs.
*
* @return Stud.IP events for a certain day exposed through a LiveData object
*/
fun getEventsForDay(day: Int): LiveData<List<StudIPEvent>> = repo.getEventsForDay(day)
}