fix chached image returning file type with extra .

This commit is contained in:
Aria Moradi 2021-06-04 10:43:03 +04:30
parent 10a29cab33
commit a29010e0d7

View File

@ -32,7 +32,7 @@ object CachedImageResponse {
val cachedFile = findFileNameStartingWith(saveDir, fileName) val cachedFile = findFileNameStartingWith(saveDir, fileName)
val filePath = "$saveDir/$fileName" val filePath = "$saveDir/$fileName"
if (cachedFile != null) { if (cachedFile != null) {
val fileType = cachedFile.substringAfter(filePath) val fileType = cachedFile.substringAfter("$filePath.")
return Pair( return Pair(
pathToInputStream(cachedFile), pathToInputStream(cachedFile),
"image/$fileType" "image/$fileType"