优化
This commit is contained in:
@@ -137,8 +137,8 @@ class BookshelfFragment1 : BaseBookshelfFragment(R.layout.fragment_bookshelf),
|
|||||||
override fun getItemPosition(`object`: Any): Int {
|
override fun getItemPosition(`object`: Any): Int {
|
||||||
val fragment = `object` as BooksFragment
|
val fragment = `object` as BooksFragment
|
||||||
val position = fragment.position
|
val position = fragment.position
|
||||||
val group = bookGroups[position]
|
val group = bookGroups.getOrNull(position)
|
||||||
if (fragment.groupId != group.groupId) {
|
if (fragment.groupId != group?.groupId) {
|
||||||
return POSITION_NONE
|
return POSITION_NONE
|
||||||
}
|
}
|
||||||
return POSITION_UNCHANGED
|
return POSITION_UNCHANGED
|
||||||
|
|||||||
Reference in New Issue
Block a user