Profile cover photo
Profile photo
Madis Pink
Android Developer @ JRebel for Android / ZeroTurnaround
Android Developer @ JRebel for Android / ZeroTurnaround
About
Posts

Hi, is there a way to cancel currently processing tasks with Retrofit?

We have a pattern were the callback object is an inner class of the fragment, which leads to fragment/viewtree leaks if the requests are running for a longer time (say, timeouts). We could either dependency inject a singleton or pull the callback object out of the fragment (and reference the frag with a weakreference) but I'm not too sure if I want to add another library dependency to the project.
Wait while more posts are being loaded