Converted all bottom sheets to use blank constructors and instead rely on bundles to retrieve data/objects, or custom view models to execute functions

This commit is contained in:
denizk0461
2023-05-02 15:02:47 +02:00
parent 5a9ab267aa
commit 2f4b205703
23 changed files with 491 additions and 314 deletions
@@ -0,0 +1,21 @@
package com.denizk0461.studip.viewmodel
import android.app.Application
import com.denizk0461.studip.model.StudIPEvent
class ScheduleUpdateViewModel(application: Application) : AppViewModel(application) {
/**
* Updates a schedule element.
*
* @param event the event to update
*/
fun update(event: StudIPEvent) { doAsync { repo.update(event) } }
/**
* Deletes a schedule element.
*
* @param event the event to delete
*/
fun delete(event: StudIPEvent) { doAsync { repo.delete(event) } }
}