diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index f85824d589..a0dc86eaf4 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -2845,14 +2845,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } int lastCharacterIndex = text.length() - 1; char lastCharacter = text.charAt(lastCharacterIndex); - char secondLastChar = ' '; + char secondToLastCharacter = ' '; if (lastCharacterIndex > 0) { - secondLastChar = text.charAt(lastCharacterIndex - 1); + secondToLastCharacter = text.charAt(lastCharacterIndex - 1); } String userHexEncodedPublicKey = TextSecurePreferences.getLocalNumber(ConversationActivity.this); LokiThreadDatabase threadDatabase = DatabaseFactory.getLokiThreadDatabase(ConversationActivity.this); LokiUserDatabase userDatabase = DatabaseFactory.getLokiUserDatabase(ConversationActivity.this); - if (lastCharacter == '@' && Character.isWhitespace(secondLastChar)) { + if (lastCharacter == '@' && Character.isWhitespace(secondToLastCharacter)) { List mentionCandidates = LokiAPI.Companion.getMentionCandidates("", threadId, userHexEncodedPublicKey, threadDatabase, userDatabase); currentMentionStartIndex = lastCharacterIndex; mentionCandidateSelectionView.show(mentionCandidates, threadId);