Update API around brandColor.

This commit is contained in:
Benoit Marty 2025-10-20 14:42:53 +02:00 committed by Benoit Marty
parent b62382ffc7
commit 38908a42a2
12 changed files with 29 additions and 6 deletions

View file

@ -135,7 +135,7 @@ class DeveloperSettingsPresenter(
}
appPreferencesStore.setTracingLogPacks(currentPacks)
}
is DeveloperSettingsEvents.ChangeBrandColor -> {
is DeveloperSettingsEvents.ChangeBrandColor -> coroutineScope.launch {
showColorPicker = false
val color = event.color?.value?.toHexString(HexFormat.UpperCase)?.substring(2, 8)
enterpriseService.overrideBrandColor(color)

View file

@ -203,6 +203,7 @@ class DeveloperSettingsPresenterTest {
assertThat(awaitItem().showColorPicker).isTrue()
initialState.eventSink(DeveloperSettingsEvents.ChangeBrandColor(Color.Green))
assertThat(awaitItem().showColorPicker).isFalse()
skipItems(1)
overrideBrandColorResult.assertions().isCalledOnce()
.with(value("00FF00"))
}