anyone already tried to use Glide together with je...
# compose
t
anyone already tried to use Glide together with jetpack compose?
l
I hacked something quick together when i was playing around. Would love for someone to make it more robust: https://gist.github.com/lelandrichardson/de674fe6788d922fc84362fdae530464
t
so i was working on the same, cool to see your code.
Copy code
val context = ambient(ContextAmbient)
what's the difference with:
Copy code
val context = AmbientContext.current
l
they’re the same thing
just APIs shifting around as we move forward
i believe
ambient
the function was deprecated
though maybe not publicly
don’t know if that made it into dev04 or not 🙂
t
ha, i like how experimental this all feels 🙂
l
lol
ambients just received a big overhaul
they’re much faster now
💯 1
🚀 2
😮 2
just missed the cut for dev04 🙂
t
Copy code
val image = state<Bitmap?> { null }
is it image = x or image.valuke = x
i noticed your 2 snippets do that differently
For me it reaches the onResourceReady, but updating the state val doesn't update the UI (https://gist.github.com/lelandrichardson/de674fe6788d922fc84362fdae530464)
Copy code
ext.compose_version = '0.1.0-dev04'
l
the difference is if you use a property delegate or not
var image by state …
vs
val image = state …
i
val context = AmbientContext.current
nice 🙂