diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt index 9c0e935ab..0ee866fde 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt @@ -45,11 +45,13 @@ class BooksFragment : BaseFragment(R.layout.fragment_books), private lateinit var activityViewModel: MainViewModel private lateinit var booksAdapter: BooksAdapter private var bookshelfLiveData: LiveData>? = null + private var position = 0 private var groupId = -1 override fun onViewCreated(view: View, savedInstanceState: Bundle?) { activityViewModel = getViewModelOfActivity(MainViewModel::class.java) arguments?.let { + position = it.getInt("position", 0) groupId = it.getInt("groupId", -1) } initRecyclerView()