facebook/fresco

Request same url several times

Open

#2,098 opened on Apr 16, 2018

View on GitHub
 (6 comments) (0 reactions) (1 assignee)Java (3,750 forks)batch import
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (17,072 stars)
PR merge metrics
 (No merged PRs in 30d)

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

Contributor guide