Add a way to reset the colors.
This commit is contained in:
parent
19e3d5901d
commit
cdd0b29527
4 changed files with 11 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit dc42b35239830bac7d7f43b10999af5c50d82019
|
||||
Subproject commit 5bb47201328b08d1c7d79a20f62268e8a4a51ba9
|
||||
|
|
@ -18,6 +18,6 @@ sealed interface DeveloperSettingsEvents {
|
|||
data class SetTracingLogLevel(val logLevel: LogLevelItem) : DeveloperSettingsEvents
|
||||
data class ToggleTracingLogPack(val logPack: TraceLogPack, val enabled: Boolean) : DeveloperSettingsEvents
|
||||
data class SetShowColorPicker(val show: Boolean) : DeveloperSettingsEvents
|
||||
data class ChangeBrandColor(val color: Color) : DeveloperSettingsEvents
|
||||
data class ChangeBrandColor(val color: Color?) : DeveloperSettingsEvents
|
||||
data object ClearCache : DeveloperSettingsEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class DeveloperSettingsPresenter(
|
|||
}
|
||||
is DeveloperSettingsEvents.ChangeBrandColor -> {
|
||||
showColorPicker = false
|
||||
val color = event.color.value.toHexString(HexFormat.UpperCase).substring(2, 8)
|
||||
val color = event.color?.value?.toHexString(HexFormat.UpperCase)?.substring(2, 8)
|
||||
enterpriseService.overrideBrandColor(color)
|
||||
}
|
||||
is DeveloperSettingsEvents.SetShowColorPicker -> {
|
||||
|
|
|
|||
|
|
@ -112,6 +112,14 @@ fun DeveloperSettingsView(
|
|||
state.eventSink(DeveloperSettingsEvents.SetShowColorPicker(true))
|
||||
}
|
||||
)
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
Text("Reset brand color")
|
||||
},
|
||||
onClick = {
|
||||
state.eventSink(DeveloperSettingsEvents.ChangeBrandColor(null))
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
PreferenceCategory(title = "Crash") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue