Archived
Fully documented all Kotlin files and added TODOs to functions that need to be updated in some way
This commit is contained in:
@@ -4,10 +4,17 @@ import android.app.Application
|
||||
import androidx.lifecycle.LiveData
|
||||
import com.denizk0461.studip.model.StudIPEvent
|
||||
|
||||
/**
|
||||
* View model for [com.denizk0461.studip.fragment.EventFragment]
|
||||
*
|
||||
* @param app reference to the app
|
||||
*/
|
||||
class EventViewModel(app: Application) : TemplateViewModel(app) {
|
||||
|
||||
/**
|
||||
* Retrieves all Stud.IP events.
|
||||
*
|
||||
* @return all Stud.IP events exposed through a LiveData object
|
||||
*/
|
||||
val allEvents: LiveData<List<StudIPEvent>> = repo.allEvents
|
||||
|
||||
fun insertEvent(event: StudIPEvent) { repo.insertEvent(event) }
|
||||
fun nukeEvents() { repo.nukeEvents() }
|
||||
}
|
||||
Reference in New Issue
Block a user