feat: Add boot behavior to AppSettings

This commit is contained in:
Myzel394 2023-10-27 12:18:15 +02:00
parent dd58ce23a9
commit d89e918996
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B

View File

@ -19,6 +19,7 @@ data class AppSettings(
val showAdvancedSettings: Boolean = false,
val theme: Theme = Theme.SYSTEM,
val lastRecording: RecordingInformation? = null,
val bootBehavior: BootBehavior? = BootBehavior.START_RECORDING,
) {
fun setShowAdvancedSettings(showAdvancedSettings: Boolean): AppSettings {
return copy(showAdvancedSettings = showAdvancedSettings)
@ -44,12 +45,21 @@ data class AppSettings(
return copy(lastRecording = lastRecording)
}
fun setBootBehavior(bootBehavior: BootBehavior?): AppSettings {
return copy(bootBehavior = bootBehavior)
}
enum class Theme {
SYSTEM,
LIGHT,
DARK,
}
enum class BootBehavior {
START_RECORDING,
SHOW_NOTIFICATION,
}
fun exportToString(): String {
return Json.encodeToString(serializer(), this)
}