Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
@Model
class MyTheme(var primaryColor: Color)
...
val colors = MaterialColors(primary = myTheme.primaryColor)
MaterialTheme(colors) {
}
If 'MaterialTheme' internally uses an ambient, changing myTheme.primaryColor will synchronously cause the ambient value to change and update its consumers. However, if MaterialTheme actually has a @Model class that gets mutated, then this will result in another recomposition for anything consuming that @Model class.
One proposed solution could be knowing that the @Model class is mutated above the scope where it is being consumed, so in the same recomposition pass we can invalidate and recompose anything consuming it.