From 3794db9a9e04fe4c66ea0b0fc7d5f0c7ec4de1af Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 23 Jun 2019 20:08:23 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/main/MainActivity.kt | 8 ++++++++ 1 file changed, 8 insertions(+) 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 13b1f29b0..29f083232 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 @@ -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.myconfig.MyConfigFragment import io.legado.app.utils.getCompatColor +import io.legado.app.utils.getPrefInt import io.legado.app.utils.getViewModel import kotlinx.android.synthetic.main.activity_main.* import kotlinx.coroutines.Dispatchers.IO @@ -49,6 +50,7 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig view_pager_main.addOnPageChangeListener(this) bottom_navigation_view.setOnNavigationItemSelectedListener(this) importYueDu() + upVersion() } override fun onNavigationItemSelected(item: MenuItem): Boolean { @@ -73,6 +75,12 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig } } + private fun upVersion() { + if (getPrefInt("versionCode") != App.INSTANCE.versionCode) { + + } + } + override fun onPageScrollStateChanged(state: Int) { }