mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
Fix mentions when in the middle of text
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
f4508bc4fe
commit
dfae11f65c
1 changed files with 1 additions and 4 deletions
|
@ -23,9 +23,6 @@ package com.nextcloud.talk.callbacks;
|
|||
import android.graphics.Typeface;
|
||||
import android.text.Editable;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.text.style.TypefaceSpan;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.models.json.mention.Mention;
|
||||
import com.nextcloud.talk.utils.MagicCharPolicy;
|
||||
import com.nextcloud.talk.utils.text.Spans;
|
||||
|
@ -41,7 +38,7 @@ public class MentionAutocompleteCallback implements AutocompleteCallback<Mention
|
|||
String replacement = item.getLabel();
|
||||
editable.replace(start, end, replacement + " ");
|
||||
Spans.MentionSpan mentionSpan = new Spans.MentionSpan(Typeface.BOLD, item.getId(), item.getLabel());
|
||||
editable.setSpan(mentionSpan, 0, replacement.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
editable.setSpan(mentionSpan, start, start + replacement.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue