fix(emoji-selector): fixes crash when you typed an emoji's name and pressed the virtual keyboard's emoji suggestion

@sk22 might like this one
This commit is contained in:
LucasGGamerM
2024-04-12 16:29:49 -03:00
parent e6a4f81b78
commit ff9587661e

View File

@@ -168,7 +168,7 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{
if(start == 0){ if(start == 0){
if(emojiRegex.matcher(s.toString()).find()){ if(emojiRegex.matcher(s.toString()).find()){
imm.hideSoftInputFromWindow(input.getWindowToken(), 0); imm.hideSoftInputFromWindow(input.getWindowToken(), 0);
listener.onEmojiSelected(s.toString().substring(before)); listener.onEmojiSelected(s.toString());
input.getText().clear(); input.getText().clear();
} }
} }