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 ca9924bb4..7c976ef55 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 @@ -45,7 +45,7 @@ class MainActivity : VMBaseActivity(R.layout.activity_main), view_pager_main.adapter = TabFragmentPageAdapter(supportFragmentManager) view_pager_main.addOnPageChangeListener(this) bottom_navigation_view.setOnNavigationItemSelectedListener(this) - upRssShow() + bottom_navigation_view.menu.findItem(R.id.menu_rss).isVisible = showRss() upVersion() } @@ -59,11 +59,6 @@ class MainActivity : VMBaseActivity(R.layout.activity_main), return false } - private fun upRssShow() { - bottom_navigation_view.menu.findItem(R.id.menu_rss).isVisible = showRss() - view_pager_main.adapter?.notifyDataSetChanged() - } - private fun upVersion() { if (getPrefInt("versionCode") != App.INSTANCE.versionCode) { putPrefInt("versionCode", App.INSTANCE.versionCode) diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index b2747f97e..7f15b44a6 100644 --- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -87,6 +87,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { "isNightTheme" -> App.INSTANCE.applyDayNight() "recordLog" -> LogUtils.upLevel() "downloadPath" -> BookHelp.upDownloadPath() + "showRss" -> activity?.recreate() } }