Skip to content

NetworkImageView does not handle cancellation properly in all cases #383

@etanhatch

Description

@etanhatch

If an old image request is ongoing and a new one happens, the cancellation does not happen properly in this case:

  1. 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)"

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions