@ -136,6 +136,11 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
binding.viewPagerMain.currentItem = 0
return true
}
(fragmentMap[getFragmentId(0)] as? BookshelfFragment2)?.let {
if (it.back()) {
if (System.currentTimeMillis() - exitTime > 2000) {
toastOnUi(R.string.double_click_exit)
exitTime = System.currentTimeMillis()
@ -140,6 +140,15 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1),
fun back(): Boolean {
if (groupId != AppConst.bookGroupNoneId) {
groupId = AppConst.bookGroupNoneId
initBooksData()
return false
override fun onQueryTextSubmit(query: String?): Boolean {
SearchActivity.start(requireContext(), query)