mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 14:40:06 +08:00
fix: GroupPagerAdapter crash
This commit is contained in:
parent
1b15199ee2
commit
2c6bfc1e51
@ -886,7 +886,8 @@ class ConfigurationFragment @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
val runFunc = if (now) requireActivity()::runOnUiThread else groupPager::post
|
||||
val runFunc = if (now) activity?.let { it::runOnUiThread } else groupPager::post
|
||||
if (runFunc != null) {
|
||||
runFunc {
|
||||
groupList = newGroupList
|
||||
notifyDataSetChanged()
|
||||
@ -900,6 +901,7 @@ class ConfigurationFragment @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
reload(true)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user