Repository navigation
Conversation
|
Making this a draft so we don't accidentally merge it before I can get someone to write proper tests. |
|
We could write a device test to verify that caching is disabled for For reference, the Glide ObjectKey source: https://github.com/bumptech/glide/blob/master/library/src/main/java/com/bumptech/glide/signature/ObjectKey.java |
|
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
|
@hartez Will this one be backported to .NET 7? I have this scenario where a user can rotate an image 90 degrees, and having to use the same filename/path on storage means it will be cached and the user will not see the rotated image. |
|
@hartez I know this is a breaking change, but would you consider backporting this to .NET 7 under a feature flag? I make a business app for a company and the app has the ability to rotate images. The image is rotated, stored on disk (at the same path which is key), Image.Uri get a property changed event - and it works great on Windows and iOS. But not Android. I think this PR would solve that. And regarding the image path, it can't be changed, it is tied to backend synchronization logic of a third party. |
|
/backport to net7.0 |
|
Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/5070757070 |
|
@hartez backporting to net7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Disable caching when loading images from streams
Applying: Automated test
.git/rebase-apply/patch:29: trailing whitespace.
.git/rebase-apply/patch:33: trailing whitespace.
await InvokeOnMainThreadAsync(async () => {
.git/rebase-apply/patch:56: trailing whitespace.
class TestMemoryStream : MemoryStream
.git/rebase-apply/patch:99: trailing whitespace.
static bool IsMatching(Bitmap bitmap1, Bitmap bitmap2)
warning: 4 lines add whitespace errors.
Using index info to reconstruct a base tree...
M src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
Falling back to patching base and 3-way merge...
Auto-merging src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
CONFLICT (content): Merge conflict in src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Automated test
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@hartez an error occurred while backporting to net7.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
|
Thanks for the backport @hartez |
Description of Change
Disables all caching when loading images from streams, because there's no available data for creating a reasonable cache key.
See this comment for a deeper explanation.
Other references:
Issues Fixed
Fixes #8676
Related to #9773