Dependency update

Fixed duplicated download file
Better download progress update handling

TODO: Add group name to GalleryBlock
This commit is contained in:
tom5079
2020-10-01 21:24:32 +09:00
parent a8317824a9
commit 5c259fa07a
9 changed files with 64 additions and 37 deletions

View File

@@ -192,7 +192,8 @@ class Cache private constructor(context: Context, val galleryID: Int) : ContextW
fun putImage(index: Int, fileName: String, data: ByteArray) {
val file = cacheFolder.getChild(fileName)
file.createNewFile()
if (!file.exists())
file.createNewFile()
file.writeBytes(data)
setMetadata { metadata -> metadata.imageList!![index] = fileName }
}