diff --git a/app/src/main/java/xyz/fycz/myreader/model/user/UserService2.kt b/app/src/main/java/xyz/fycz/myreader/model/user/UserService2.kt index df37615..e64fbc3 100644 --- a/app/src/main/java/xyz/fycz/myreader/model/user/UserService2.kt +++ b/app/src/main/java/xyz/fycz/myreader/model/user/UserService2.kt @@ -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 } diff --git a/app/version_code.properties b/app/version_code.properties index b50f857..a401823 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,3 +1,3 @@ #Fri Jun 18 21:45:31 CST 2021 -VERSION_CODE=228 +VERSION_CODE=229 NEED_CREATE_RELEASE=true