pull/433/head
gedoor 4 years ago
parent 34e61195b3
commit cfced34c2d
  1. 2
      app/src/main/java/io/legado/app/data/AppDatabase.kt

@ -49,12 +49,10 @@ abstract class AppDatabase: RoomDatabase() {
private val dbCallback = object : Callback() { private val dbCallback = object : Callback() {
override fun onCreate(db: SupportSQLiteDatabase) { override fun onCreate(db: SupportSQLiteDatabase) {
super.onCreate(db)
db.setLocale(Locale.CHINESE) db.setLocale(Locale.CHINESE)
} }
override fun onOpen(db: SupportSQLiteDatabase) { override fun onOpen(db: SupportSQLiteDatabase) {
db.setLocale(Locale.CHINESE)
db.execSQL( db.execSQL(
""" """
insert into book_groups(groupId, groupName, 'order', show) select ${AppConst.bookGroupAllId}, '全部', -10, 1 insert into book_groups(groupId, groupName, 'order', show) select ${AppConst.bookGroupAllId}, '全部', -10, 1

Loading…
Cancel
Save