优化
This commit is contained in:
@@ -385,6 +385,9 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
|
|||||||
|
|
||||||
override fun getItemPosition(any: Any): Int {
|
override fun getItemPosition(any: Any): Int {
|
||||||
val position = (any as MainFragmentInterface).position
|
val position = (any as MainFragmentInterface).position
|
||||||
|
if (position < 0) {
|
||||||
|
return POSITION_NONE
|
||||||
|
}
|
||||||
val fragmentId = getId(position)
|
val fragmentId = getId(position)
|
||||||
if ((fragmentId == idBookshelf1 && any is BookshelfFragment1)
|
if ((fragmentId == idBookshelf1 && any is BookshelfFragment1)
|
||||||
|| (fragmentId == idBookshelf2 && any is BookshelfFragment2)
|
|| (fragmentId == idBookshelf2 && any is BookshelfFragment2)
|
||||||
|
|||||||
Reference in New Issue
Block a user