mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 14:13:38 +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);
|
List<Tuple2<String, String>> users = LokiAPI.Companion.getUsers("", threadId, userDatabase);
|
||||||
mentionStartIndex = currentEndIndex + 1;
|
mentionStartIndex = currentEndIndex + 1;
|
||||||
userSelectionView.show(users, threadId);
|
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;
|
mentionStartIndex = -1;
|
||||||
userSelectionView.hide();
|
userSelectionView.hide();
|
||||||
} else {
|
} else {
|
||||||
|
@ -777,7 +777,7 @@ public class ConversationItem extends LinearLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SpannableString highlightMentions(CharSequence text, boolean isGroupThread) {
|
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);
|
Matcher matcher = pattern.matcher(text);
|
||||||
ArrayList<Range<Integer>> mentions = new ArrayList<>();
|
ArrayList<Range<Integer>> mentions = new ArrayList<>();
|
||||||
if (matcher.find() && isGroupThread) {
|
if (matcher.find() && isGroupThread) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user