@@ -68,7 +68,7 @@ private static void RegisterRenderer(Type type, Type renderer)
6868 }
6969
7070 private bool _isDisposed ;
71- private IScheduledWork _currentTask ;
71+ private IScheduledWork _currentTask ;
7272 private ImageSourceBinding _lastImageSource ;
7373 private readonly MotionEventHelper _motionEventHelper = CachedImage . FixedAndroidMotionEventHandler ? new MotionEventHelper ( ) : null ;
7474 private readonly static Type _platformDefaultRendererType = typeof ( ImageRenderer ) . Assembly . GetType ( "Xamarin.Forms.Platform.Android.Platform+DefaultRenderer" ) ;
@@ -131,7 +131,7 @@ protected override void OnElementChanged(ElementChangedEventArgs<CachedImage> e)
131131
132132 if ( e . NewElement != null )
133133 {
134- e . NewElement . InternalReloadImage = new Action ( ReloadImage ) ;
134+ e . NewElement . InternalReloadImage = new Action ( ReloadImage ) ;
135135 e . NewElement . InternalCancel = new Action ( CancelIfNeeded ) ;
136136 e . NewElement . InternalGetImageAsJPG = new Func < GetImageAsJpgArgs , Task < byte [ ] > > ( GetImageAsJpgAsync ) ;
137137 e . NewElement . InternalGetImageAsPNG = new Func < GetImageAsPngArgs , Task < byte [ ] > > ( GetImageAsPngAsync ) ;
@@ -234,9 +234,9 @@ private void UpdateBitmap(CachedImageView imageView, CachedImage image, CachedIm
234234 }
235235 }
236236
237- private async void ImageLoadingSizeChanged ( CachedImage element , bool isLoading )
238- {
239- if ( element == null || _isDisposed || isLoading )
237+ private async void ImageLoadingSizeChanged ( CachedImage element , bool isLoading )
238+ {
239+ if ( element == null || _isDisposed )
240240 return ;
241241
242242 await ImageService . Instance . Config . MainThreadDispatcher . PostAsync ( ( ) =>
@@ -245,11 +245,13 @@ await ImageService.Instance.Config.MainThreadDispatcher.PostAsync(() =>
245245 return ;
246246
247247 ( ( IVisualElementController ) element ) . NativeSizeChanged ( ) ;
248- element . SetIsLoading ( isLoading ) ;
248+
249+ if ( ! isLoading )
250+ element . SetIsLoading ( isLoading ) ;
249251 } ) ;
250- }
252+ }
251253
252- private void ReloadImage ( )
254+ private void ReloadImage ( )
253255 {
254256 UpdateBitmap ( Control , Element , null ) ;
255257 }
0 commit comments