Skip to content

Commit

Permalink
🐛 Fix errors with body annotations (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
jheubuch authored Dec 22, 2024
1 parent 85e339d commit be44795
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ data class Status(
val emoji = match.groupValues.getOrElse(1) { "" }
val customEmoji = mastodonEmoji.firstOrNull { it.shortcode == emoji }
if (customEmoji != null) {
builder.appendInlineContent(customEmoji.shortcode, customEmoji.shortcode)
builder.appendInlineContent(customEmoji.shortcode, ":${customEmoji.shortcode}:")
inlineTextContent[customEmoji.shortcode] = InlineTextContent(
Placeholder(24.sp, 24.sp, PlaceholderVerticalAlign.TextCenter)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ fun CheckInCardContent(
text = message.first!!,
onClick = {
val annotations = message.first!!.getStringAnnotations(it - 1, it + 1)
if (annotations.isNotEmpty()) {
if (annotations.isNotEmpty() && annotations.any { annotation -> annotation.tag == "userMention" }) {
userSelected(annotations.first().item, false, false)
} else {
textClicked()
Expand Down Expand Up @@ -716,7 +716,7 @@ private fun CheckInCardFooter(
contentDescription = null
)
Text(
text = status.event.name,
text = status.event!!.name,
style = LocalFont.current.labelMedium
)
}
Expand Down

0 comments on commit be44795

Please sign in to comment.