mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
feat: Add boot behavior to AppSettings
This commit is contained in:
parent
dd58ce23a9
commit
d89e918996
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user