Image Download Priority
Hi there,
I have a view which contains a bunch of images, some on-screen, some off-screen accessible by scrolling through carousels. When images are being downloaded, I want to be able to prioritise the on-screen images and download those first, then the off-screen images.
Therefore I'd like to request some download priority system be implemented which allows me to accomplish such a goal. Apologies if this already exists and I've missed it in your docs.
Cheers.
It would not be that hard to add such a prioritization system, we could add new Fluent method WithPriority() which would accept an enum:
LoadingPriority
{
Lowest = -1
Low = -2,
Normal = 0,
High = 1,
Highest = 2
}
By default all request would have priority Normal
@daniel-luberda @joeforshaw What do you think about it?
Would it be possible to pass the priority as an int instead of an enum? That way you have very fine grain control of the priority an image.
Yes, we should definitely implement it. I already mentioned about it here: https://github.com/molinch/FFImageLoading/issues/143#issuecomment-185732777 - it would be also very useful in that case.
+1 for WithPriority() fluent method and LoadingPriority enum. We could also implement a method with int param but it should be optional as it can be misleading (for advanced use only). Maybe something like:
LoadingPriority
{
Lowest = -100,
Low = -50,
Normal = 0,
High = 50,
Highest = 100
}
Perfect.
There is now an Alpha nuget that includes it: https://www.nuget.org/packages/Xamarin.FFImageLoading.Forms/2.1.0-alpha1
Please note that this is NOT production ready but it allows to test the functionality. Could you give us your feedback on it?