pull/332/head^2
gedoor 4 years ago
parent 94cd21297e
commit 2f95f1ebb2
  1. 3
      app/src/main/java/io/legado/app/App.kt
  2. 4
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

@ -37,10 +37,9 @@ class App : MultiDexApplication() {
private set
lateinit var androidId: String
}
var versionCode = 0
var versionName = ""
}
override fun onCreate() {
super.onCreate()

@ -93,8 +93,8 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main),
}
private fun upVersion() {
if (getPrefInt(PreferKey.versionCode) != App.INSTANCE.versionCode) {
putPrefInt(PreferKey.versionCode, App.INSTANCE.versionCode)
if (getPrefInt(PreferKey.versionCode) != App.versionCode) {
putPrefInt(PreferKey.versionCode, App.versionCode)
if (!BuildConfig.DEBUG) {
val log = String(assets.open("updateLog.md").readBytes())
TextDialog.show(supportFragmentManager, log, TextDialog.MD, 5000, true)

Loading…
Cancel
Save