diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt index 276f6bdf9..f28cfcfe9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt @@ -212,6 +212,10 @@ class BackupRestoreService : Service() { // Restore individual manga mangasJson.forEach { + if (job?.isActive != true) { + throw Exception(getString(R.string.restoring_backup_canceled)) + } + restoreManga(it.asJsonObject) } @@ -252,10 +256,6 @@ class BackupRestoreService : Service() { ?: JsonArray() ) - if (job?.isActive != true) { - throw Exception(getString(R.string.restoring_backup_canceled)) - } - try { restoreMangaData(manga, chapters, categories, history, tracks) } catch (e: Exception) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt index abfa286d8..c5e8d4ce6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt @@ -172,7 +172,7 @@ class SettingsLibraryController : SettingsController() { preference { titleRes = R.string.action_edit_categories - val catCount = db.getCategories().executeAsBlocking().size + val catCount = dbCategories.size summary = context.resources.getQuantityString(R.plurals.num_categories, catCount, catCount) onClick {