Fixes wierd crash

This commit is contained in:
tom5079
2019-12-14 17:04:04 +09:00
parent 079654a9c7
commit d55ff6d68e

View File

@@ -81,9 +81,14 @@ fun getOldReaderGalleries(context: Context) : List<File> {
if (!readerFile.exists())
return@let
Json(JsonConfiguration.Stable).parseJson(readerFile.readText()).jsonObject.let { reader ->
if (!reader.contains("code"))
oldGallery.add(gallery)
try {
Json(JsonConfiguration.Stable).parseJson(readerFile.readText())
.jsonObject.let { reader ->
if (!reader.contains("code"))
oldGallery.add(gallery)
}
} catch (e: Exception) {
// do nothing
}
}
}