|
|
@ -45,7 +45,6 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1), |
|
|
|
BaseBooksAdapter.CallBack { |
|
|
|
BaseBooksAdapter.CallBack { |
|
|
|
|
|
|
|
|
|
|
|
private val binding by viewBinding(FragmentBookshelf1Binding::bind) |
|
|
|
private val binding by viewBinding(FragmentBookshelf1Binding::bind) |
|
|
|
private lateinit var searchView: SearchView |
|
|
|
|
|
|
|
private lateinit var booksAdapter: BaseBooksAdapter<*> |
|
|
|
private lateinit var booksAdapter: BaseBooksAdapter<*> |
|
|
|
override var groupId = AppConst.bookGroupNoneId |
|
|
|
override var groupId = AppConst.bookGroupNoneId |
|
|
|
private var booksFlowJob: Job? = null |
|
|
|
private var booksFlowJob: Job? = null |
|
|
@ -198,6 +197,14 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun getItemType(position: Int): Int { |
|
|
|
|
|
|
|
return if (groupId == AppConst.bookGroupNoneId) { |
|
|
|
|
|
|
|
if (position < bookGroups.size) 1 else 0 |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun getItem(position: Int): Any { |
|
|
|
override fun getItem(position: Int): Any { |
|
|
|
return if (groupId == AppConst.bookGroupNoneId) { |
|
|
|
return if (groupId == AppConst.bookGroupNoneId) { |
|
|
|
if (position < bookGroups.size) { |
|
|
|
if (position < bookGroups.size) { |
|
|
|