pull/51/head
kunfei 5 years ago
parent 97e17cb696
commit 64210aec08
  1. 7
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt
  2. 1
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt

@ -45,7 +45,7 @@ class MainActivity : VMBaseActivity<MainViewModel>(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<MainViewModel>(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)

@ -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()
}
}

Loading…
Cancel
Save