From e740202869d73a2326ea790f0d472533f41d97cd Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 21 Mar 2022 09:08:36 +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 --- .../java/io/legado/app/ui/main/MainActivity.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index d4d50c35c..a99515442 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -207,17 +207,18 @@ class MainActivity : VMBaseActivity(), menu.findItem(R.id.menu_discovery).isVisible = showDiscovery menu.findItem(R.id.menu_rss).isVisible = showRss } - bottomMenuCount = 1 + var index = 0 if (showDiscovery) { - realPositions[bottomMenuCount] = idExplore - bottomMenuCount++ + index++ + realPositions[index] = idExplore } if (showRss) { - realPositions[bottomMenuCount] = idRss - bottomMenuCount++ + index++ + realPositions[index] = idRss } - realPositions[bottomMenuCount] = idMy - bottomMenuCount++ + index++ + realPositions[index] = idMy + bottomMenuCount = index + 1 } private fun getFragmentId(position: Int): Int {