Adds support for UiMediaScope in iOS - #3340
Conversation
There was a problem hiding this comment.
Can web changes be moved to web PR?
There was a problem hiding this comment.
this is part of this PR #3339 . Once it merges the changes in this iOS PR will not be visible (only way i have to make it work like a stacked pr)
| ) | ||
| private val systemThemeState: MutableState<SystemTheme> = mutableStateOf(SystemTheme.UNKNOWN) | ||
|
|
||
| private val systemDensityState: MutableState<Density> = mutableStateOf(window?.density ?: Density(1f)) |
There was a problem hiding this comment.
There is screenDensity currently in WindowContext. These two should be consolidated as they represent the same value dependent on the current window.
There was a problem hiding this comment.
Done! Removed the one from MediaEnvironment as it it unused and leftover from previous pr
|
|
||
| val systemTheme: SystemTheme | ||
| get() = systemThemeState.value | ||
| val systemDensity: Density |
There was a problem hiding this comment.
I am not sure this value belongs here. IMO better to keep it in WindowContext as it is tied to window.
I see that it is not required by the UiMediaScope interface.
…MediaEnvironment.ios.kt Co-authored-by: Andrei Salavei <Andrei.Salavei@jetbrains.com>
Follow-up of #3339
Merge after mentioned PR is merged (iOS changes only, skiko logic is handled in said PR)
Release Notes
N/A