bumptech / bumptech/glide

pause and resume specific requests

Open
#2,678 6 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
4d 1h
Merged PRs (30d)
8

Description

Glide Version:4.3.1
Android Version:7.0


`
val glide = GlideApp.with(locationsFragment);
`
adapter loading code
`
var fullRequest = glide!!
.asDrawable()
.dontTransform()
.override(size!!.x, size!!.y)
fullRequest!!.load(imagePath)
.error(GlideApp.with(locationsFragment).load(path)
.into(holder.img)
`

I'm creating another request which is "thumbnail"

`
var thumbnailRequest = GlideApp.with(context)
.asDrawable()
.dontTransform()
.priority(Priority.IMMEDIATE)
.diskCacheStrategy(DiskCacheStrategy.DATA)
.override(size!!.x / 100, size!!.y / 100)`

Im using this to pause/resume requests ` glide.pauseRequests() glide.resumeRequests() `

here `glide` is the same instance as above, which is used in `fullrequest`. `thumbnailRequest ` uses another context and as I understand, another Glide instance.

I want some type of requests to be paused in Glide. But I tried and it pauses all requests. I have Recyclerview with items which have 2 different images. I want to pause requests for one type of images only. Is it possible?

Issue is that when I call `glide.pauseRequests()` , `thumbnailRequest ` also gets paused.

Contributor guide

Open the contributing guide

Research direction

Start with the request-manager entry points shown in the report: GlideApp.with(...), pauseRequests(), and resumeRequests(). Compare the managers used for fullRequest and thumbnailRequest; done means only the intended image requests pause while the other type continues.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.