From 64210aec08cfeae3cc7fd80c32e6a8049bc0e884 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 1 Dec 2019 18:44:41 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/main/MainActivity.kt | 7 +------ app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt | 1 + 2 files changed, 2 insertions(+), 6 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 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() } }