From 75ef6403533d797c7764ca365847decdb34b905e Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 22 Aug 2020 17:46:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/AppDatabase.kt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/AppDatabase.kt b/app/src/main/java/io/legado/app/data/AppDatabase.kt index cbff7a715..84ace7663 100644 --- a/app/src/main/java/io/legado/app/data/AppDatabase.kt +++ b/app/src/main/java/io/legado/app/data/AppDatabase.kt @@ -8,10 +8,6 @@ import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import io.legado.app.data.dao.* import io.legado.app.data.entities.* -import io.legado.app.help.storage.Backup -import io.legado.app.help.storage.Restore -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch @Database( @@ -38,11 +34,6 @@ abstract class AppDatabase : RoomDatabase() { migration_13_14, migration_14_15 ) - .addCallback(object : Callback() { - override fun onDestructiveMigration(db: SupportSQLiteDatabase) { - GlobalScope.launch { Restore.restoreDatabase(Backup.backupPath) } - } - }) .allowMainThreadQueries() .build() }