Fixes wierd crash
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user