nativescript-community / ui-image

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.
Apache License 2.0
36 stars 9 forks source link

Image disappears on navigation start #51

Closed RGBvision closed 10 months ago

RGBvision commented 1 year ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Code on page:

<uiImage:Img
  src="https://gravitydance.ru/uploads/images/persons/thumbnail/andrey-f720x720.png"
  placeholderImageUri="~/images/instructor.png"
  failureImageUri="~/images/instructor.png"
  width="100" height="100"
  decodeWidth="200" decodeHeight="200"
  roundAsCircle="true" padding="0" margin="0" verticalAlignment="center" horizontalAlignment="center"/>

When navigating off the page, the image disappears just before the animation starts. This especially noticeable with a fade transition between pages.

Frame.topmost().navigate({
        animated: true,
        transition: {
          name: "fade"
        },
        moduleName: '~/screens/home/home-page',
        clearHistory: true
      });
farfromrefug commented 1 year ago

@RGBvision and it is not happening with N image component?

RGBvision commented 1 year ago

@farfromrefug No. Only with ui-image. BTW on iOS works fine.

vallemar commented 10 months ago

I have the same behavior in 2 different applications. It only happens on Android.

farfromrefug commented 10 months ago

@vallemar ok might be a lifecycle issue. one question does it happen also with my framework? If you have a simple reproducible example i can look at it

vallemar commented 10 months ago

@farfromrefug sure: https://github.com/vallemar/ns-community-image Yes, it also happens to me with your fork.

farfromrefug commented 10 months ago

@vallemar i have tested the navigation within the plugin demo app and it works fine. I can confirm it does not work with your test app. Could it be a vue3 issue?

RGBvision commented 10 months ago

@farfromrefug this happens in {N} Core application too

farfromrefug commented 10 months ago

@RGBvision @vallemar ok i have reproduced it. Can you confirm it only happens with SharedTransition ? Actually might be happening when the imageview is in a collectionview (maybe also listview)

vallemar commented 10 months ago

@farfromrefug ummm, can't you see it here? https://github.com/vallemar/ns-community-image/tree/main all the apps I've seen it in are vue3. but this one that I give as an example does not have lists. On the other hand no, I don't use SharedTransition to see this behavior   😅

RGBvision commented 10 months ago

@farfromrefug this happens without SharedTransition

farfromrefug commented 10 months ago

I am not seeing it when the imageview is NOT in a collection view (there is an example in the vue démo app). Though I started seeing it in an app of mine. At first i thought the key was the share transition but I am now thinking it could be the collection view. Will have to dig deeper

farfromrefug commented 10 months ago

@vallemar @RGBvision should be fixed in latest version

RGBvision commented 10 months ago

@farfromrefug I confirm that the bug is fixed

vallemar commented 10 months ago

I confirm it on my side too, thank you!