mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
This commit is contained in:
@@ -92,7 +92,6 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
|
||||
upBottomMenu()
|
||||
initView()
|
||||
upHomePage()
|
||||
viewModel.deleteNotShelfBook()
|
||||
onBackPressedDispatcher.addCallback(this) {
|
||||
if (pagePosition != 0) {
|
||||
binding.viewPagerMain.currentItem = 0
|
||||
|
||||
@@ -58,6 +58,10 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
|
||||
setMaxRecycledViews(0, 100)
|
||||
}
|
||||
|
||||
init {
|
||||
deleteNotShelfBook()
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
upTocPool.close()
|
||||
@@ -247,7 +251,7 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
|
||||
}
|
||||
}
|
||||
|
||||
fun deleteNotShelfBook() {
|
||||
private fun deleteNotShelfBook() {
|
||||
execute {
|
||||
appDb.bookDao.deleteNotShelfBook()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user