Merge remote-tracking branch 'upstream/master' into master

pull/332/head
github-actions 4 years ago
commit b9a08bed37
  1. 5
      app/src/main/java/io/legado/app/App.kt
  2. 4
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

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

@ -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