Started implementation of event update sheet

This commit is contained in:
denizk0461
2023-04-24 15:43:42 +02:00
parent a53232a814
commit 9b6e267cb0
24 changed files with 410 additions and 53 deletions
@@ -1,6 +1,7 @@
package com.denizk0461.studip.viewmodel
import android.app.Application
import com.denizk0461.studip.model.SettingsPreferences
/**
* View model for [com.denizk0461.studip.fragment.SettingsFragment]
@@ -9,10 +10,24 @@ import android.app.Application
*/
class SettingsViewModel(app: Application) : AppViewModel(app) {
/**
* This value determines whether the user opts into submitting crash reports.
*/
var preferenceCourseHighlighting: Boolean
get() = repo.getPreference(SettingsPreferences.DATA_HANDLING)
set(newValue) { repo.setPreference(SettingsPreferences.DATA_HANDLING, newValue) }
/**
* This value determines whether the user wants to have allergens marked.
*/
var preferenceAllergen: Boolean
get() = repo.getPreferenceAllergen()
set(value) { repo.setPreferenceAllergen(value) }
get() = repo.getPreference(SettingsPreferences.ALLERGEN)
set(newValue) { repo.setPreference(SettingsPreferences.ALLERGEN, newValue) }
/**
* This value determines whether the user opts into submitting crash reports.
*/
var preferenceDataHandling: Boolean
get() = repo.getPreference(SettingsPreferences.DATA_HANDLING)
set(newValue) { repo.setPreference(SettingsPreferences.DATA_HANDLING, newValue) }
}