KEMBAR78
Ensure glide targets run once by mattleibow · Pull Request #6739 · dotnet/maui · GitHub
Skip to content

Conversation

@mattleibow
Copy link
Member

@mattleibow mattleibow commented May 2, 2022

Description of Change

  • Ensure glide targets run once
  • Also refactored the managed ImageLoaderCallback types to use a common base to avoid duplication issues
  • Fixed some formatting
  • Updated readme/docs on the correct way to build the aar
  • New aar (🏴‍☠️) build

Issues Fixed

- Also refactored the managed ImageLoaderCallback types to use a common base to avoid duplication issues
- Fixed some formatting
- Updated readme/docs on the correct way to build the aar
- New aar build
Comment on lines +28 to +30
if (completed)
return;
this.completed = true;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the real fix - for both the onLoadFailed and onResourceReady methods. For both MauiCustomTarget and MauiCustomViewTarget.

In no world is calling this on the same instance valid because the ctor takes a callback which is wrapping a TaskCompletionSource. Even if we use the TryXxx methods, this means nothing because there is work that is done after the await - and if nothing is awaiting, then nothing will get done.

Comment on lines -9 to +7
internal class ImageLoaderResultCallback : Java.Lang.Object, IImageLoaderCallback
class ImageLoaderResultCallback : ImageLoaderCallbackBase<IImageSourceServiceResult<Drawable>>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, can't handle duplicate code with just a differing return type.

@Eilon Eilon added the area-setup Installation, setup, requirements, maui-check, workloads, platform support label May 2, 2022
@mattleibow mattleibow added platform/android area-image Image loading, sources, caching p/0 Work that we can't release without and removed area-setup Installation, setup, requirements, maui-check, workloads, platform support labels May 3, 2022
@mattleibow mattleibow self-assigned this May 3, 2022
@mattleibow mattleibow requested a review from Redth May 3, 2022 06:30
@mattleibow mattleibow added this to the 6.0.300 milestone May 3, 2022
@PureWeen PureWeen merged commit e16bb0b into main May 3, 2022
@PureWeen PureWeen deleted the dev/fix-6702 branch May 3, 2022 14:59
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@Eilon Eilon added area-controls-image Image control and removed area-image Image loading, sources, caching labels May 10, 2024
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-image Image control fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! p/0 Work that we can't release without platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glide tries to set TCS a second time if you background app and then return to it

4 participants