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 d15b00fe1e..ed2aba4dd3 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 @@ -226,7 +226,7 @@ class BackupRestoreService : Service() { } private fun restoreCategories(categoriesJson: JsonElement) { - db.executeTransaction { + db.inTransaction { backupManager.restoreCategories(categoriesJson.asJsonArray) restoreProgress += 1 @@ -235,7 +235,7 @@ class BackupRestoreService : Service() { } private fun restoreManga(mangaJson: JsonObject) { - db.executeTransaction { + db.inTransaction { val manga = backupManager.parser.fromJson(mangaJson.get(MANGA)) val chapters = backupManager.parser.fromJson>( mangaJson.get(CHAPTERS) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/DatabaseHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/DatabaseHelper.kt index 912530c570..474d2d6b8e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/DatabaseHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/DatabaseHelper.kt @@ -45,13 +45,4 @@ open class DatabaseHelper(context: Context) : .build() inline fun inTransaction(block: () -> Unit) = db.inTransaction(block) - - fun executeTransaction(block: () -> Unit) { - db.lowLevel().beginTransaction() - - block() - - db.lowLevel().setTransactionSuccessful() - db.lowLevel().endTransaction() - } }