From 7656540866994c3e096ec25de382cfd5956fd19f Mon Sep 17 00:00:00 2001 From: Greg Price Date: Sat, 7 Dec 2024 15:41:00 -0800 Subject: [PATCH] wip emoji: Order "popular" emoji canonically amongst themselves; TODO test --- lib/model/emoji.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/model/emoji.dart b/lib/model/emoji.dart index 966d76c999..6ef9047985 100644 --- a/lib/model/emoji.dart +++ b/lib/model/emoji.dart @@ -271,12 +271,18 @@ class EmojiStoreImpl with EmojiStore { List _generateAllCandidates() { final results = []; + // Include the "popular" emoji in their canonical order + // relative to each other. + results.addAll(zulipPopularEmojis); + final namesOverridden = { for (final emoji in realmEmoji.values) emoji.name, 'zulip', }; // TODO(log) if _serverEmojiData missing for (final entry in (_serverEmojiData ?? {}).entries) { + if (_popularEmojiCodes.contains(entry.key)) continue; + final allNames = entry.value; final String emojiName; final List? aliases;