This commit is contained in:
kunfei 2023-07-01 20:08:15 +08:00
parent 2bdf640284
commit bfd27a2f5f

View File

@ -385,6 +385,9 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
override fun getItemPosition(any: Any): Int {
val position = (any as MainFragmentInterface).position
if (position < 0) {
return POSITION_NONE
}
val fragmentId = getId(position)
if ((fragmentId == idBookshelf1 && any is BookshelfFragment1)
|| (fragmentId == idBookshelf2 && any is BookshelfFragment2)