Revert unintentional behavior change for mention spans to use remote usernames (#2408)
This commit is contained in:
parent
71739ba87f
commit
ad001d044d
1 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ fun setClickableMentions(view: TextView, mentions: List<Mention>?, listener: Lin
|
||||||
|
|
||||||
for (mention in mentions) {
|
for (mention in mentions) {
|
||||||
val customSpan = getCustomSpanForMentionUrl(mention.url, mention.id, listener)
|
val customSpan = getCustomSpanForMentionUrl(mention.url, mention.id, listener)
|
||||||
end += 1 + mention.username.length // length of @ + username
|
end += 1 + mention.localUsername.length // length of @ + username
|
||||||
flags = getSpanFlags(customSpan)
|
flags = getSpanFlags(customSpan)
|
||||||
if (firstMention) {
|
if (firstMention) {
|
||||||
firstMention = false
|
firstMention = false
|
||||||
|
@ -160,7 +160,7 @@ fun setClickableMentions(view: TextView, mentions: List<Mention>?, listener: Lin
|
||||||
}
|
}
|
||||||
|
|
||||||
append("@")
|
append("@")
|
||||||
append(mention.username)
|
append(mention.localUsername)
|
||||||
setSpan(customSpan, start, end, flags)
|
setSpan(customSpan, start, end, flags)
|
||||||
append("\u200B") // same reasoning as in setClickableText
|
append("\u200B") // same reasoning as in setClickableText
|
||||||
end += 1 // shift position to take the previous character into account
|
end += 1 // shift position to take the previous character into account
|
||||||
|
|
Loading…
Reference in a new issue