Show the follower's bio/note in a "followed you" notification (#3281)
This makes the notification view for a follow request contain more info about the new follower, and makes the layout (of their name / username) consistent with other notifications that show names/usernames.
This commit is contained in:
parent
af2727b633
commit
f1b3faf85f
10 changed files with 35 additions and 7 deletions
|
|
@ -64,6 +64,7 @@ data class ConversationAccountEntity(
|
|||
localUsername = localUsername,
|
||||
username = username,
|
||||
displayName = displayName,
|
||||
note = "",
|
||||
url = "",
|
||||
avatar = avatar,
|
||||
emojis = emojis
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import com.keylesspalace.tusky.entity.TimelineAccount
|
|||
import com.keylesspalace.tusky.util.StatusDisplayOptions
|
||||
import com.keylesspalace.tusky.util.emojify
|
||||
import com.keylesspalace.tusky.util.loadAvatar
|
||||
import com.keylesspalace.tusky.util.parseAsMastodonHtml
|
||||
import com.keylesspalace.tusky.util.unicodeWrap
|
||||
import com.keylesspalace.tusky.viewdata.NotificationViewData
|
||||
|
||||
|
|
@ -92,6 +93,12 @@ class FollowViewHolder(
|
|||
avatarRadius42dp,
|
||||
animateAvatars
|
||||
)
|
||||
|
||||
binding.notificationAccountNote.text = account.note.parseAsMastodonHtml().emojify(
|
||||
account.emojis,
|
||||
binding.notificationAccountNote,
|
||||
animateEmojis
|
||||
)
|
||||
}
|
||||
|
||||
private fun setupButtons(listener: NotificationActionListener, accountId: String) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ fun TimelineAccountEntity.toAccount(gson: Gson): TimelineAccount {
|
|||
localUsername = localUsername,
|
||||
username = username,
|
||||
displayName = displayName,
|
||||
note = "",
|
||||
url = url,
|
||||
avatar = avatar,
|
||||
bot = bot,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ data class TimelineAccount(
|
|||
@SerializedName("display_name") val displayName: String?, // should never be null per Api definition, but some servers break the contract
|
||||
val url: String,
|
||||
val avatar: String,
|
||||
val note: String,
|
||||
val bot: Boolean = false,
|
||||
val emojis: List<Emoji>? = emptyList() // nullable for backward compatibility
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue