From f1eeec99e8edb23fe2c6c0ad91e85584d5fcbcae Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Wed, 18 Dec 2024 21:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/rss/favorites/RssFavoritesActivity.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesActivity.kt b/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesActivity.kt index 243fec33c508..0d3b3a0b9c8e 100644 --- a/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesActivity.kt @@ -104,13 +104,12 @@ class RssFavoritesActivity : BaseActivity() { if (groupsMenu != null) { upGroupsMenu() } - if (groupList.isNotEmpty() && currentGroup.isEmpty()) { - currentGroup = groupList[0] - } adapter.notifyDataSetChanged() val item = groupList.indexOf(currentGroup) if (item > -1) { binding.viewPager.setCurrentItem(item) + } else if (groupList.isNotEmpty()) { + currentGroup = groupList[binding.viewPager.currentItem] } } }