From 4b3e3346bbe461f1be2d84616370efb04d97b9b3 Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Sat, 6 Aug 2022 08:28:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=97=AA=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/huanchengfly/tieba/post/api/models/Profile.kt | 4 +--- .../huanchengfly/tieba/post/fragments/MyInfoFragment.kt | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt b/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt index 59366784..d4df135f 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt @@ -83,7 +83,7 @@ data class Profile( @SerializedName("bg_pic") val bgPic: String, @SerializedName("birthday_info") - val birthdayInfo: BirthdayInfo, + val birthdayInfo: BirthdayInfo?, @SerializedName("bookmark_count") val bookmarkCount: String, @SerializedName("bookmark_new_count") @@ -159,8 +159,6 @@ data class Profile( val newTshowIcon: List, @SerializedName("outer_id") val outerId: String, - @SerializedName("parr_scores") - val parrScores: ParrScores, @SerializedName("pay_member_info") val payMemberInfo: PayMemberInfo, val pendant: List, diff --git a/app/src/main/java/com/huanchengfly/tieba/post/fragments/MyInfoFragment.kt b/app/src/main/java/com/huanchengfly/tieba/post/fragments/MyInfoFragment.kt index 70ade6a0..89bfa7e6 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/fragments/MyInfoFragment.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/fragments/MyInfoFragment.kt @@ -192,10 +192,10 @@ class MyInfoFragment : BaseFragment(), View.OnClickListener, CompoundButton.OnCh postNum = profile.user.postNum concernNum = profile.user.concernNum tbAge = profile.user.tbAge - age = profile.user.birthdayInfo.age - birthdayShowStatus = profile.user.birthdayInfo.birthdayShowStatus - birthdayTime = profile.user.birthdayInfo.birthdayTime - constellation = profile.user.birthdayInfo.constellation + age = profile.user.birthdayInfo?.age + birthdayShowStatus = profile.user.birthdayInfo?.birthdayShowStatus + birthdayTime = profile.user.birthdayInfo?.birthdayTime + constellation = profile.user.birthdayInfo?.constellation saveOrUpdate("uid = ?", uid) } }