eurofurence / ef-app_react-native

Android/Web Version of the EF "Mobile" App in React Native
MIT License
7 stars 4 forks source link

dealer list forgets about icons #170

Open YiffyToys opened 2 months ago

YiffyToys commented 2 months ago

Android app release 5.0.0

Flinging up and down in the dealer list, thumbnail icons for dealers start to randomly vanish. The more you scroll, the more icons disappear.

Not replaced with a placeholder or loading animation like Picasso, Glide or similar image-loading libraries do but with a blank background. Not appearing again after waiting a while

lukashaertel commented 1 month ago

I can reproduce. The image library uses glide under the hood, so I'm guessing it's an upstream bug. I can check if changing some options helps.

YiffyToys commented 1 month ago

I don't think glide is responsible. The icons disapear when out of screen. Thus when the list elements are recycled. It looks like an attempt to load them is made only once and they are not stored in the model but in the view and then not loaded again when the view gets recycled.

lukashaertel commented 1 month ago

There's compatibility options for images in the virtualized list implementation we use, I'll have a look.

lukashaertel commented 1 month ago

So far it doesn't help, might be an issue because we have section headers, which is a valid, but more elaborate way of using flash list.

So far I've upgraded the versions, applied recycleKey, removed the placeholder, but no luck yet.

We might need to push this issue back unless I have an eureka moment

YiffyToys commented 1 month ago

Were in the code is it? I develop native Android apps, so react isn't my playing field but I have a good understanding of the lifecycle and recycling of objects.

lukashaertel commented 1 month ago

https://github.com/eurofurence/ef-app_react-native/blob/bd199a93ab722a988fe8c7c64def432c44f51c9b/src/components/dealers/DealersSectionedList.tsx#L58

https://github.com/eurofurence/ef-app_react-native/blob/bd199a93ab722a988fe8c7c64def432c44f51c9b/src/components/dealers/DealerCard.tsx#L67

YiffyToys commented 1 month ago

I suggest to add an onError in additipn to onLoadStart and onLoadEnd here https://github.com/eurofurence/ef-app_react-native/blob/bd199a93ab722a988fe8c7c64def432c44f51c9b/src/components/generic/atoms/Image.tsx

As it can be reproduced locally, a simple logcat-output should tell us why it fails.

lukashaertel commented 1 month ago

I had a console log in there but it didn't trigger