JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.24k stars 1.11k forks source link

Fix `DesktopImageStorage` to store images by id, rather than by the `PictureData.Camera` itself #4963

Closed m-sasha closed 1 week ago

m-sasha commented 1 week ago

DesktopImageStorage was using the PictureData.Camera itself as the key to its images, which is wrong, because PictureData.Camera contains metadata that can change. This causes a crash when editing e.g. the description of an image.

Also moved responsibility for putting a new picture into pictures from DesktopImageStorage to Dependencies, as all the other management of pictures is there.

Testing