bumptech / bumptech/glide

Expose RequestBuilder's model

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

Description

**Glide Version**: 4.15.1

**Issue details / Repro steps / Use case background**:
Can Glide expose a `RequestBuilder`'s model? I'm building a composable that can take glide requests, but it's proving hard to find a key for remembering requests across compositions.

```kotlin
val request = Glide.with(context)
.load("https://example.com/image.jpg")
.thumbnail(…)
.transition(…)

val downloader = remember(request.model) {
GlideImageDownloader(request)
}
```

Using `request` as the remember key isn't ideal because `RequestBuilder` is not a stable API. For example, `withCrossFade(100) == withCrossFade(100)` will always be false.

Contributor guide

Open the contributing guide

Research direction

Start with the RequestBuilder API and trace how the model supplied through Glide.with(...).load(...) is retained. Define a stable way for callers such as GlideImageDownloader to access that model and verify that it can be used as a composition key without relying on RequestBuilder equality.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
api, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.