Sometimes returning the wrong image when using cells in MvvmCross
See original GitHub issueI have been working on some projects in Xamarin.iOS (with MvvmCross) where FFImageLoading is used. I’m not using the MvvmCross implementation that comes with the FFImageLoading package, it’s a straight up classic loading, just in a cell:
ImageService.Instance.LoadUrl ( value ).WithCache ( CacheType.Disk ).FadeAnimation ( true, true, 200 ).Retry ( 3, 3000 ).Finish ( ImageFinishedLoading ).Into ( CoverImageView );
This gives some sort of race condition where some of the images loaded turns up in the wrong cell, often the same image shows up several times. In my case, it’s almost always within the first 4-5 cells (don’t know if that makes a difference).
The thing is, in MvvmCross the content of the cells (the ViewModels) is loaded/added in tasks, so the content of the cells may come slightly later, which could be a part of the reason, but not completely sure. But it’s only a problem with the image, the rest of the content in the cell is correct, so it’s not the wrong ViewModel loaded into the cell.
I also tried to use .IntoAsync()
but that didn’t make a difference, neither to remove any of the other parameters used.
I had the problem in both 2.2.8 and the new 2.2.9.
Let me know if you need any further information.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
Agreed, haven’t had any issues with this for a long time. Great work!
I’ll close this one as it should be fixed in the newest stable. Thanks