diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 05ea0208..cc9afc9f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -7,7 +7,6 @@ diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt index 8ba67873..645b7c2c 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt @@ -27,8 +27,13 @@ class TagLabeledNStorage( override suspend fun init() { val storage = locateStorage() if (storage?.exists() == true) { - val json = Json.decodeFromStream(storage.inputStream()) - tagLabeledAmount.putAll(json.data) + try { + val json = Json.decodeFromStream(storage.inputStream()) + tagLabeledAmount.putAll(json.data) + } catch (exception: Exception) { + Timber.e("TagLabeledNStorage.init exception: " + exception.message) + } + } else { index.allIds() .associateWith { tagsStorage.getTags(it) }