facebook/fresco

Request same url several times

Open

#2.098 geöffnet am 16. Apr. 2018

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Java (3.750 Forks)batch import
enhancementgood first issuehelp wanted

Repository-Metriken

Stars
 (17.072 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I encountered a problem. When the image is downloading I close the activity, then reopen it, the image will download twice. Also, in RecyclerView when I scroll the list up and down quickly, some Images will download several times. This is a demo for this bug. https://github.com/binwin20/frescoDemo

This is issue is the same as https://github.com/facebook/fresco/issues/587, but can't reopen that issue, so open a new one.

Initialization:

class DemoApp:Application() {
    override fun onCreate() {
        super.onCreate()
        Fresco.initialize(this)
    }
}

Set Image url:

class SecondActivity: Activity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_second)
        val draweeView: SimpleDraweeView = findViewById(R.id.image_view)
        draweeView.setImageURI(Constant.URL)
    }
}

Requests in Charles: image

Contributor Guide