mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix test regression.
This commit is contained in:
+2
-2
@@ -76,7 +76,7 @@ class MarkdownTextEditorState(
|
|||||||
val text = resolvedSuggestion.roomMember.displayName?.prependIndent("@") ?: resolvedSuggestion.roomMember.userId.value
|
val text = resolvedSuggestion.roomMember.displayName?.prependIndent("@") ?: resolvedSuggestion.roomMember.userId.value
|
||||||
val link = permalinkBuilder.permalinkForUser(resolvedSuggestion.roomMember.userId).getOrNull() ?: return
|
val link = permalinkBuilder.permalinkForUser(resolvedSuggestion.roomMember.userId).getOrNull() ?: return
|
||||||
val mentionPill = mentionSpanProvider.getMentionSpanFor(text, link)
|
val mentionPill = mentionSpanProvider.getMentionSpanFor(text, link)
|
||||||
currentText.replace(suggestion.start, suggestion.end, ". ")
|
currentText.replace(suggestion.start, suggestion.end, "@ ")
|
||||||
val end = suggestion.start + 1
|
val end = suggestion.start + 1
|
||||||
currentText.setSpan(mentionPill, suggestion.start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
currentText.setSpan(mentionPill, suggestion.start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
this.text.update(currentText, true)
|
this.text.update(currentText, true)
|
||||||
@@ -87,7 +87,7 @@ class MarkdownTextEditorState(
|
|||||||
val text = resolvedSuggestion.roomAlias.value
|
val text = resolvedSuggestion.roomAlias.value
|
||||||
val link = permalinkBuilder.permalinkForRoomAlias(resolvedSuggestion.roomAlias).getOrNull() ?: return
|
val link = permalinkBuilder.permalinkForRoomAlias(resolvedSuggestion.roomAlias).getOrNull() ?: return
|
||||||
val mentionPill = mentionSpanProvider.getMentionSpanFor(text, link)
|
val mentionPill = mentionSpanProvider.getMentionSpanFor(text, link)
|
||||||
currentText.replace(suggestion.start, suggestion.end, "@ ")
|
currentText.replace(suggestion.start, suggestion.end, "# ")
|
||||||
val end = suggestion.start + 1
|
val end = suggestion.start + 1
|
||||||
currentText.setSpan(mentionPill, suggestion.start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
currentText.setSpan(mentionPill, suggestion.start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
this.text.update(currentText, true)
|
this.text.update(currentText, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user