fix: reduced animation causes asset viewer to not render high res version#29815
fix: reduced animation causes asset viewer to not render high res version#29815alextran1502 wants to merge 1 commit into
Conversation
|
📱 Android release APK (universal) — Download: https://github.com/immich-app/immich/actions/runs/29119698478/artifacts/8238154914 Installs as a separate app (applicationId |
mertalev
left a comment
There was a problem hiding this comment.
I'm not a fan of this. Arguably, this should be solved with an upstream issue instead.
| /// "Remove animations" accessibility setting or an animator duration scale of | ||
| /// zero), which would freeze these images at their low-res first frame. | ||
| /// Photos are not animations, so clear the flag for this subtree. | ||
| class ProgressiveImageGuard extends StatelessWidget { |
There was a problem hiding this comment.
This looks very hacky. Can we extend Image to override its behavior instead? It also seems inappropriate to disable this considering images can be animated.
There was a problem hiding this comment.
yeah, I don't like wrapping this with every image widget
There was a problem hiding this comment.
although I don't think we can extend the Image class for this, since the property is set in the internal private state of the Image class https://github.com/flutter/flutter/blame/041dc6a9a2d93d3ef9bc2994fd08545903207aee/packages/flutter/lib/src/widgets/image.dart#L1147
|
Fwiw, this apk build did resolve the issue on my brief testing of it just now. |
|
Another option would be to check |
Also thought about that, but if we would do that, we would also need to stop providing the initial image, or? So if users has "show original" turned on or is on a slow internet connection, we would show nothing till the image has loaded which could take some time. This could really be a downer for user experience. |
Fix #29727
Changes from flutter/flutter#176492 "Image GIF pausing" when the OS reports reduced motion (MediaQuery.disableAnimations, Android's "Remove animations" accessibility setting or animator duration scale 0). The Image widget now stops listening to its image stream after the first frame.