fix: crash that sometimes happens when longclicking emoji in compose

I have no idea how it happens, nor why. But I am sure this will fix it
This commit is contained in:
LucasGGamerM 2023-12-17 13:23:09 -03:00
parent b8fe1fd640
commit f1c55aa5e8
1 changed files with 1 additions and 1 deletions

View File

@ -375,7 +375,7 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{
@Override
public boolean onLongClick(){
if(!isRecentEmojiCategory) return false;
if(!isRecentEmojiCategory || requests.size() < getAbsoluteAdapterPosition()-1 || 0 > getAbsoluteAdapterPosition()-1) return false;
requests.remove(getAbsoluteAdapterPosition()-1);
getBindingAdapter().notifyItemRemoved(getAbsoluteAdapterPosition());
getBindingAdapter().notifyItemChanged(0);