mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
修复
This commit is contained in:
parent
6cadcb639c
commit
75f0739be9
@ -143,6 +143,12 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
appCtx.putPrefInt(PreferKey.bookshelfLayout, value)
|
||||
}
|
||||
|
||||
var saveTabPosition: Int
|
||||
get() = appCtx.getPrefInt(PreferKey.saveTabPosition, 0)
|
||||
set(value) {
|
||||
appCtx.putPrefInt(PreferKey.saveTabPosition, value)
|
||||
}
|
||||
|
||||
var bookExportFileName: String?
|
||||
get() = appCtx.getPrefString(PreferKey.bookExportFileName)
|
||||
set(value) {
|
||||
|
@ -16,6 +16,7 @@ import io.legado.app.data.appDb
|
||||
import io.legado.app.data.entities.Book
|
||||
import io.legado.app.data.entities.BookGroup
|
||||
import io.legado.app.databinding.FragmentBookshelf1Binding
|
||||
import io.legado.app.help.config.AppConfig
|
||||
import io.legado.app.lib.theme.accentColor
|
||||
import io.legado.app.lib.theme.primaryColor
|
||||
import io.legado.app.ui.book.group.GroupEditDialog
|
||||
@ -109,7 +110,7 @@ class BookshelfFragment1() : BaseBookshelfFragment(R.layout.fragment_bookshelf1)
|
||||
private fun selectLastTab() {
|
||||
tabLayout.post {
|
||||
tabLayout.removeOnTabSelectedListener(this)
|
||||
tabLayout.getTabAt(0)?.select()
|
||||
tabLayout.getTabAt(AppConfig.saveTabPosition)?.select()
|
||||
tabLayout.addOnTabSelectedListener(this)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user