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
1 changed files with 2 additions and 2 deletions

View File

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