Fix NPE in follow requests view (#1739)

Fixes #1738
This commit is contained in:
Levi Bard 2020-03-27 19:04:28 +01:00 committed by GitHub
parent 0e6312c0f3
commit 1b476c790a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,9 +23,9 @@ internal class FollowRequestViewHolder(itemView: View, private val showHeader: B
val emojifiedName: CharSequence = CustomEmojiHelper.emojifyString(wrappedName, account.emojis, itemView)
itemView.displayNameTextView.text = emojifiedName
if (showHeader) {
itemView.notificationTextView.text = itemView.context.getString(R.string.notification_follow_request_format, emojifiedName)
itemView.notificationTextView?.text = itemView.context.getString(R.string.notification_follow_request_format, emojifiedName)
}
itemView.notificationTextView.visible(showHeader)
itemView.notificationTextView?.visible(showHeader)
val format = itemView.context.getString(R.string.status_username_format)
val formattedUsername = String.format(format, account.username)
itemView.usernameTextView.text = formattedUsername