Skip to content

Commit

Permalink
ANDROID-14177 Allow compose compatibility theme overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
yamal-alm committed Jan 16, 2024
1 parent 2d26365 commit 50ec11c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ fun MisticaTheme(
val context = LocalContext.current
LaunchedEffect(key1 = brand) {
context.setTheme(brand.compatibilityTheme)
brand.compatibilityThemeOverrides.forEach {
context.theme.applyStyle(it, true)
}
}

val colors = if (darkTheme) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import com.telefonica.mistica.compose.title.TitleStyle

interface Brand {
val compatibilityTheme: Int
val compatibilityThemeOverrides: List<Int>
get() = emptyList()
val lightColors: MisticaColors
val darkColors: MisticaColors
val fontFamily: FontFamily
Expand Down

0 comments on commit 50ec11c

Please sign in to comment.