Git Product home page Git Product logo

Comments (7)

chrisbanes avatar chrisbanes commented on May 10, 2024

I've just tried this locally and I can't reproduce. Do you have a larger runnable reproducing case?

from accompanist.

DavidIbrahim avatar DavidIbrahim commented on May 10, 2024

I created a new repo with the issue demonstrated

from accompanist.

chrisbanes avatar chrisbanes commented on May 10, 2024

Thanks, I can repro but I don't really understand what's triggering it. I think what is happening is that Glide is re-executing the request whenever the host ComposeView is attached/detached.

To be honest I'm tempted to kill the Glide and Picasso libraries. Glide has a lot implicit functionality built on top of views which doesn't necessarily make sense for Compose, and Glide hasn't been updated in years.

Compose is built upon Kotlin and Coroutines, so I think it makes sense to only support Coil in the future.

from accompanist.

DavidIbrahim avatar DavidIbrahim commented on May 10, 2024

Ohh I see, If that's the case kill it, anyway thanks for the great library 😊

from accompanist.

pedrovgs avatar pedrovgs commented on May 10, 2024

@DavidIbrahim @chrisbanes any workaround or quick fix we can use without updating the lib or migrating to coil?

from accompanist.

chrisbanes avatar chrisbanes commented on May 10, 2024

Had a look at this today, and yep it's due to Glide doing all sorts of implicit automatic behavior that we no longer want.

As a workaround for now, you can do: val glide = Glide.with(LocalContext.current.applicationContext). Then either provide it to each GlideImage(), or use the LocalRequestManager composition local. See here for more info.

from accompanist.

pedrovgs avatar pedrovgs commented on May 10, 2024

Thanks @chrisbanes 😃

from accompanist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.