bumptech / bumptech/glide

RequestListener behavior when using thumbnail() method

Open
#4,510 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

I'm using Glide 4.12.0 (latest version).
When I start downloading an image with `thumbnail()` specified like this

`requestBuilder.thumbnail(thumbRequestBuilder).load(mainUrl)`

**I.** If the main request fails before thumbnail request finishs and succeeds we will get 2 `RequestListener` callbacks in this order:
1> `onLoadFailed` for the main request
2> `onResourceReady` for the thumbnail

I think this is redundant and Glide should wait for the thumbnail request to finish and call either `onLoadFailed` if both request fail or `onResourceReady` if thumbnail request succeeds.

**II.** If both thumbnail and main request succeed and thumbnail request comes first we will get 2 `onResourceReady` callbacks. This is ok but look like there is no way to check which is thumbnail and which is main request.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.