limit autocomplete to 50 emojis

This commit is contained in:
likeazir 2024-11-13 21:18:47 +01:00
parent f91b887586
commit d0e49a710d

View File

@ -208,6 +208,7 @@ public class ComposeAutocompleteViewController{
.filter(e -> !startsWithSearch.contains(e))
.filter(e -> e.shortcode.toLowerCase().contains(_text.toLowerCase())))
.map(WrappedEmoji::new)
.limit(50)
.collect(Collectors.toList());
emptyButtonAdapter.setVisible(emojis.isEmpty());
UiUtils.updateList(oldList, emojis, list, emojisAdapter, (e1, e2)->e1.emoji.shortcode.equals(e2.emoji.shortcode));