facebook/fresco

Request same url several times

Open

#2 098 ouverte le 16 avr. 2018

Voir sur GitHub
 (6 commentaires) (0 réactions) (1 assigné)Java (3 750 forks)batch import
enhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (17 072 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur