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 showAdvancedSettings: Boolean = false,
|
||||||
val theme: Theme = Theme.SYSTEM,
|
val theme: Theme = Theme.SYSTEM,
|
||||||
val lastRecording: RecordingInformation? = null,
|
val lastRecording: RecordingInformation? = null,
|
||||||
|
val bootBehavior: BootBehavior? = BootBehavior.START_RECORDING,
|
||||||
) {
|
) {
|
||||||
fun setShowAdvancedSettings(showAdvancedSettings: Boolean): AppSettings {
|
fun setShowAdvancedSettings(showAdvancedSettings: Boolean): AppSettings {
|
||||||
return copy(showAdvancedSettings = showAdvancedSettings)
|
return copy(showAdvancedSettings = showAdvancedSettings)
|
||||||
@ -44,12 +45,21 @@ data class AppSettings(
|
|||||||
return copy(lastRecording = lastRecording)
|
return copy(lastRecording = lastRecording)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setBootBehavior(bootBehavior: BootBehavior?): AppSettings {
|
||||||
|
return copy(bootBehavior = bootBehavior)
|
||||||
|
}
|
||||||
|
|
||||||
enum class Theme {
|
enum class Theme {
|
||||||
SYSTEM,
|
SYSTEM,
|
||||||
LIGHT,
|
LIGHT,
|
||||||
DARK,
|
DARK,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class BootBehavior {
|
||||||
|
START_RECORDING,
|
||||||
|
SHOW_NOTIFICATION,
|
||||||
|
}
|
||||||
|
|
||||||
fun exportToString(): String {
|
fun exportToString(): String {
|
||||||
return Json.encodeToString(serializer(), this)
|
return Json.encodeToString(serializer(), this)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user