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 2da9d066a..0311a821d 100644 --- a/app/src/main/java/io/legado/app/data/AppDatabase.kt +++ b/app/src/main/java/io/legado/app/data/AppDatabase.kt @@ -50,13 +50,13 @@ abstract class AppDatabase : RoomDatabase() { private const val DATABASE_NAME = "legado.db" - fun createDatabase(context: Context) = - Room.databaseBuilder(context, AppDatabase::class.java, DATABASE_NAME) - .fallbackToDestructiveMigrationFrom(1, 2, 3, 4, 5, 6, 7, 8, 9) - .addMigrations(*DatabaseMigrations.migrations) - .allowMainThreadQueries() - .addCallback(dbCallback) - .build() + fun createDatabase(context: Context) = Room + .databaseBuilder(context, AppDatabase::class.java, DATABASE_NAME) + .fallbackToDestructiveMigrationFrom(1, 2, 3, 4, 5, 6, 7, 8, 9) + .addMigrations(*DatabaseMigrations.migrations) + .allowMainThreadQueries() + .addCallback(dbCallback) + .build() private val dbCallback = object : Callback() {