Merge pull request #932 from likeazir/emoji-performance
Limit autocompleted emojis to 50
This commit is contained in:
commit
eae55c6e71
|
@ -208,6 +208,7 @@ public class ComposeAutocompleteViewController{
|
||||||
.filter(e -> !startsWithSearch.contains(e))
|
.filter(e -> !startsWithSearch.contains(e))
|
||||||
.filter(e -> e.shortcode.toLowerCase().contains(_text.toLowerCase())))
|
.filter(e -> e.shortcode.toLowerCase().contains(_text.toLowerCase())))
|
||||||
.map(WrappedEmoji::new)
|
.map(WrappedEmoji::new)
|
||||||
|
.limit(50)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
emptyButtonAdapter.setVisible(emojis.isEmpty());
|
emptyButtonAdapter.setVisible(emojis.isEmpty());
|
||||||
UiUtils.updateList(oldList, emojis, list, emojisAdapter, (e1, e2)->e1.emoji.shortcode.equals(e2.emoji.shortcode));
|
UiUtils.updateList(oldList, emojis, list, emojisAdapter, (e1, e2)->e1.emoji.shortcode.equals(e2.emoji.shortcode));
|
||||||
|
|
Loading…
Reference in New Issue