Skip to content

Instantly share code, notes, and snippets.

@hwchong
Created December 8, 2015 08:53
Show Gist options
  • Save hwchong/9ab4ff6619803525f618 to your computer and use it in GitHub Desktop.
Save hwchong/9ab4ff6619803525f618 to your computer and use it in GitHub Desktop.
Fuel.download(path).destination {
response, url ->
File(uuidFolder, "portrait.jpg")
}.response { request, response, either ->
when(either) {
is Either.Left -> {
//TODO
delegate.portraitDownloadIncomplete()
}
is Either.Right -> {
portraitCount -= 1
if (portraitCount == 0) {
delegate.portraitDownloadComplete()
}
}
}
}
@kittinunf
Copy link

Ok. Can you give me some example of the path, so I could check where the problem lies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment