mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Ensure that mention behavior is consistent cross-platform
This commit is contained in:
parent
20f303b2a2
commit
3d78dac65c
@ -2756,7 +2756,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
List<Tuple2<String, String>> users = LokiAPI.Companion.getUsers("", threadId, userDatabase);
|
||||
mentionStartIndex = currentEndIndex + 1;
|
||||
userSelectionView.show(users, threadId);
|
||||
} else if (Character.getType(lastCharacter) != Character.UPPERCASE_LETTER && Character.getType(lastCharacter) != Character.LOWERCASE_LETTER) {
|
||||
} else if (Character.isWhitespace(lastCharacter)) {
|
||||
mentionStartIndex = -1;
|
||||
userSelectionView.hide();
|
||||
} else {
|
||||
|
@ -777,7 +777,7 @@ public class ConversationItem extends LinearLayout
|
||||
}
|
||||
|
||||
private SpannableString highlightMentions(CharSequence text, boolean isGroupThread) {
|
||||
Pattern pattern = Pattern.compile("@\\w*");
|
||||
Pattern pattern = Pattern.compile("@[0-9a-fA-F]*");
|
||||
Matcher matcher = pattern.matcher(text);
|
||||
ArrayList<Range<Integer>> mentions = new ArrayList<>();
|
||||
if (matcher.find() && isGroupThread) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user