If an old image request is ongoing and a new one happens, the cancellation does not happen properly in this case:
-
The old image was already loaded before the new request happens, but the callback is delayed in the onResponse handler due to: "if (isImmediate && isInLayoutPass)"
-
The new image is loaded instantly (from a cache), but "if (isImmediate && isInLayoutPass)" does not happen for this request
Now the setImageBitmap() method is called first with the new image, then called again right afterwards with the old image.
If an old image request is ongoing and a new one happens, the cancellation does not happen properly in this case:
The old image was already loaded before the new request happens, but the callback is delayed in the onResponse handler due to: "if (isImmediate && isInLayoutPass)"
The new image is loaded instantly (from a cache), but "if (isImmediate && isInLayoutPass)" does not happen for this request
Now the setImageBitmap() method is called first with the new image, then called again right afterwards with the old image.