mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
2bdf640284
commit
bfd27a2f5f
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user