|
|
@ -65,6 +65,7 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main), |
|
|
|
private fun restore() { |
|
|
|
private fun restore() { |
|
|
|
if (getPrefBoolean("dbChange")) { |
|
|
|
if (getPrefBoolean("dbChange")) { |
|
|
|
Restore.restore() |
|
|
|
Restore.restore() |
|
|
|
|
|
|
|
putPrefBoolean("dbChange", false) |
|
|
|
} else if (getPrefInt("versionCode") == 0) { |
|
|
|
} else if (getPrefInt("versionCode") == 0) { |
|
|
|
launch { |
|
|
|
launch { |
|
|
|
if (withContext(IO) { App.db.bookDao().allBookCount == 0 }) { |
|
|
|
if (withContext(IO) { App.db.bookDao().allBookCount == 0 }) { |
|
|
|