From 1cf685075243baa73d7e37ed0bec6f45f7e6c90b Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Thu, 5 Apr 2018 21:46:34 +0200 Subject: [PATCH] fix note not displaying correctly in EditProfileActivity --- .../com/keylesspalace/tusky/EditProfileActivity.kt | 2 +- .../java/com/keylesspalace/tusky/entity/Account.kt | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt index 06e7dc0c..929941cc 100644 --- a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt @@ -139,7 +139,7 @@ class EditProfileActivity : BaseActivity(), Injectable { } val me = response.body() oldDisplayName = me!!.displayName - oldNote = me.note.toString() + oldNote = me.source?.note oldLocked = me.locked displayNameEditText.setText(oldDisplayName) diff --git a/app/src/main/java/com/keylesspalace/tusky/entity/Account.kt b/app/src/main/java/com/keylesspalace/tusky/entity/Account.kt index a69a9ca2..dccee5d2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/entity/Account.kt +++ b/app/src/main/java/com/keylesspalace/tusky/entity/Account.kt @@ -38,7 +38,9 @@ data class Account( val locked: Boolean = false, @SerializedName("followers_count") val followersCount: Int, @SerializedName("following_count") val followingCount: Int, - @SerializedName("statuses_count") val statusesCount: Int + @SerializedName("statuses_count") val statusesCount: Int, + val source: AccountSource? + ) : Parcelable { val name: String @@ -67,3 +69,10 @@ data class Account( } } + +@Parcelize +data class AccountSource( + val privacy: Status.Visibility, + val sensitive: Boolean, + val note: String +): Parcelable \ No newline at end of file