@@ -843,22 +843,19 @@ class _ViewReactionsEmojiItem extends StatelessWidget {
843843 emojiType: reactionWithVotes.reactionType,
844844 emojiCode: reactionWithVotes.emojiCode,
845845 emojiName: emojiName);
846+ // (Not calling EmojiDisplay.resolve. For expediency, rather than design a
847+ // reasonable layout for [Emojiset.text], in this case we just override that
848+ // setting and show the emoji anyway.)
846849
847- // Don't use a :text_emoji:-style display here.
848- final placeholder = SizedBox .square (dimension: emojiSize);
849-
850- // TODO make a helper widget for this
851- final emoji = switch (emojiDisplay) {
852- UnicodeEmojiDisplay () => UnicodeEmojiWidget (
853- size: emojiSize,
854- emojiDisplay: emojiDisplay),
855- ImageEmojiDisplay () => ImageEmojiWidget (
856- size: emojiSize,
857- emojiDisplay: emojiDisplay,
858- // If image emoji fails to load, show nothing.
859- errorBuilder: (_, _, _) => placeholder),
860- TextEmojiDisplay () => placeholder,
861- };
850+ final emoji = EmojiWidget (
851+ emojiDisplay: emojiDisplay,
852+ squareDimension: emojiSize,
853+ buildCustomTextEmoji: () =>
854+ // Invoked when an image emoji's URL didn't parse; see
855+ // EmojiStore.emojiDisplayFor. Don't show text, just an empty square.
856+ // TODO(design) refine?; offer a visible touch target with tooltip?
857+ SizedBox .square (dimension: emojiSize),
858+ );
862859
863860 Widget result = Tooltip (
864861 message: emojiName,
0 commit comments