fix(compose-autocomplete): add null checks to hashtags logic

Fuck java
This commit is contained in:
LucasGGamerM
2024-04-12 16:53:43 -03:00
parent ff9587661e
commit d047379785

View File

@@ -192,7 +192,13 @@ public class ComposeAutocompleteViewController{
Hashtag tag=new Hashtag();
tag.name=lastText.substring(1);
hashtags.add(tag);
UiUtils.updateList(oldList, hashtags, list, hashtagsAdapter, (t1, t2)->t1.name.equals(t2.name));
UiUtils.updateList(oldList, hashtags, list, hashtagsAdapter, (t1, t2)->{
if(t1 != null && t2 != null)
return t1.name.equals(t2.name);
else {
return false;
}
});
list.postDelayed(hashtagsDebouncer, 300);
}else if(mode==Mode.EMOJIS){