bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.67k stars 6.12k forks source link

[Compose] Expose Glide loading status as an observable state. #5417

Closed mhozza closed 1 month ago

mhozza commented 5 months ago

Issue details / Repro steps / Use case background:

We would like to show / hide some other UI based on the glide loading status. It would be great if Glide could expose observable loading state that could be used for this:

API Example:

val glideState = rememberGlideState()

GlideImage(glideState, ...)

if(glideState.status == Status.SUCCEEDED) {
  ShareButton(...)
}
mhozza commented 1 month ago

Looks like the GlideSubcomposition is good enough for this usecase.