facebook/fresco

Request same url several times

Open

#2098 aperta il 16 apr 2018

Vedi su GitHub
 (6 commenti) (0 reazioni) (1 assegnatario)Java (3750 fork)batch import
enhancementgood first issuehelp wanted

Metriche repository

Star
 (17.072 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor