修复部分机型闪退的问题

master v2.2.9
fengyuecanzhu 3 years ago
parent 5f904182a2
commit 0b1cdba6ac
  1. 8
      app/src/main/java/xyz/fycz/myreader/model/user/UserService2.kt
  2. 2
      app/version_code.properties

@ -171,8 +171,12 @@ object UserService2 {
fun readConfig(): User? {
val config = FileUtils.read(App.getmContext(), "userConfig.fy")
if ("" != config) {
return GSON.fromJson(config, User::class.java)
if (!config.isNullOrEmpty()) {
return try {
GSON.fromJson(config, User::class.java)
} catch (e: Exception) {
null
}
}
return null
}

@ -1,3 +1,3 @@
#Fri Jun 18 21:45:31 CST 2021
VERSION_CODE=228
VERSION_CODE=229
NEED_CREATE_RELEASE=true

Loading…
Cancel
Save