Improve API and fix theme glitch when switching between accounts.
This commit is contained in:
parent
8b88ca20b1
commit
49c23a922e
13 changed files with 120 additions and 61 deletions
|
|
@ -19,7 +19,7 @@ import io.element.android.compound.theme.ElementTheme
|
|||
import io.element.android.compound.theme.Theme
|
||||
import io.element.android.compound.theme.isDark
|
||||
import io.element.android.compound.theme.mapToTheme
|
||||
import io.element.android.features.enterprise.api.EnterpriseService
|
||||
import io.element.android.compound.tokens.generated.SemanticColors
|
||||
import io.element.android.libraries.core.meta.BuildMeta
|
||||
import io.element.android.libraries.core.meta.BuildType
|
||||
import io.element.android.libraries.preferences.api.store.AppPreferencesStore
|
||||
|
|
@ -53,7 +53,8 @@ val LocalBuildMeta = staticCompositionLocalOf {
|
|||
@Composable
|
||||
fun ElementThemeApp(
|
||||
appPreferencesStore: AppPreferencesStore,
|
||||
enterpriseService: EnterpriseService,
|
||||
compoundLight: SemanticColors,
|
||||
compoundDark: SemanticColors,
|
||||
buildMeta: BuildMeta,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
|
|
@ -70,8 +71,6 @@ fun ElementThemeApp(
|
|||
}
|
||||
)
|
||||
}
|
||||
val compoundLight by enterpriseService.semanticColorsLight()
|
||||
val compoundDark by enterpriseService.semanticColorsDark()
|
||||
CompositionLocalProvider(
|
||||
LocalBuildMeta provides buildMeta,
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue