pull/32/head
kunfei 6 years ago
parent 5437bf824a
commit 3794db9a9e
  1. 8
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

@ -22,6 +22,7 @@ import io.legado.app.ui.main.booksource.BookSourceFragment
import io.legado.app.ui.main.findbook.FindBookFragment import io.legado.app.ui.main.findbook.FindBookFragment
import io.legado.app.ui.main.myconfig.MyConfigFragment import io.legado.app.ui.main.myconfig.MyConfigFragment
import io.legado.app.utils.getCompatColor import io.legado.app.utils.getCompatColor
import io.legado.app.utils.getPrefInt
import io.legado.app.utils.getViewModel import io.legado.app.utils.getViewModel
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.IO
@ -49,6 +50,7 @@ class MainActivity : BaseActivity<MainViewModel>(), BottomNavigationView.OnNavig
view_pager_main.addOnPageChangeListener(this) view_pager_main.addOnPageChangeListener(this)
bottom_navigation_view.setOnNavigationItemSelectedListener(this) bottom_navigation_view.setOnNavigationItemSelectedListener(this)
importYueDu() importYueDu()
upVersion()
} }
override fun onNavigationItemSelected(item: MenuItem): Boolean { override fun onNavigationItemSelected(item: MenuItem): Boolean {
@ -73,6 +75,12 @@ class MainActivity : BaseActivity<MainViewModel>(), BottomNavigationView.OnNavig
} }
} }
private fun upVersion() {
if (getPrefInt("versionCode") != App.INSTANCE.versionCode) {
}
}
override fun onPageScrollStateChanged(state: Int) { override fun onPageScrollStateChanged(state: Int) {
} }

Loading…
Cancel
Save