优化
This commit is contained in:
@@ -104,13 +104,12 @@ class RssFavoritesActivity : BaseActivity<ActivityRssFavoritesBinding>() {
|
|||||||
if (groupsMenu != null) {
|
if (groupsMenu != null) {
|
||||||
upGroupsMenu()
|
upGroupsMenu()
|
||||||
}
|
}
|
||||||
if (groupList.isNotEmpty() && currentGroup.isEmpty()) {
|
|
||||||
currentGroup = groupList[0]
|
|
||||||
}
|
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
val item = groupList.indexOf(currentGroup)
|
val item = groupList.indexOf(currentGroup)
|
||||||
if (item > -1) {
|
if (item > -1) {
|
||||||
binding.viewPager.setCurrentItem(item)
|
binding.viewPager.setCurrentItem(item)
|
||||||
|
} else if (groupList.isNotEmpty()) {
|
||||||
|
currentGroup = groupList[binding.viewPager.currentItem]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user