Rebuilding Downloader

This commit is contained in:
Pupil
2020-01-28 12:56:32 +09:00
parent 4edc87c197
commit 8a9ab6b36c

View File

@@ -173,7 +173,9 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont
override fun onResponse(call: Call, response: Response) {
response.use {
result[tag] = (it.body?: return).bytes()
val res = it.body!!.bytes()
result[tag] = res
Cache(context).putImage(galleryID, index, res)
progress[tag] = Float.POSITIVE_INFINITY
}
}