@@ -102,41 +102,43 @@ class AddReactionButton extends MessageActionSheetMenuItemButton {
102
102
// apply bottom padding to handle keyboard opening via https://github.com/flutter/flutter/issues/71418
103
103
padding: EdgeInsets .only (bottom: MediaQuery .of (emojiPickerContext).viewInsets.bottom),
104
104
child: EmojiPicker (
105
- config: Config (emojiSet: emojiSet),
106
- onEmojiSelected: (_, Emoji ? emoji) async {
107
- if (emoji == null ) {
108
- // dismiss emoji picker
109
- Navigator .of (emojiPickerContext).pop ();
110
- return ;
111
- }
112
- final emojiName = emoji.name;
113
- final emojiCode = getEmojiCode (emoji);
114
- String ? errorMessage;
115
- try {
116
- await addReaction (PerAccountStoreWidget .of (messageListContext).connection,
117
- messageId: message.id,
118
- reactionType: ReactionType .unicodeEmoji,
119
- emojiCode: emojiCode,
120
- emojiName: emojiName,
121
- );
122
- if (! emojiPickerContext.mounted) return ;
123
- Navigator .of (emojiPickerContext).pop ();
124
- } catch (e) {
125
- debugPrint ('Error adding reaction: $e ' );
126
- if (! emojiPickerContext.mounted) return ;
127
-
128
- switch (e) {
129
- case ZulipApiException ():
130
- errorMessage = e.message;
131
- // TODO specific messages for common errors, like network errors
132
- // (support with reusable code)
133
- default :
105
+ config: Config (
106
+ emojiSet: emojiSet,
107
+ categoryViewConfig: const CategoryViewConfig (recentTabBehavior: RecentTabBehavior .NONE )),
108
+ onEmojiSelected: (_, Emoji ? emoji) async {
109
+ if (emoji == null ) {
110
+ // dismiss emoji picker
111
+ Navigator .of (emojiPickerContext).pop ();
112
+ return ;
134
113
}
135
-
136
- await showErrorDialog (context: emojiPickerContext,
137
- title: 'Adding reaction failed' , message: errorMessage);
138
- }
139
- }));
114
+ final emojiName = emoji.name;
115
+ final emojiCode = getEmojiCode (emoji);
116
+ String ? errorMessage;
117
+ try {
118
+ await addReaction (PerAccountStoreWidget .of (messageListContext).connection,
119
+ messageId: message.id,
120
+ reactionType: ReactionType .unicodeEmoji,
121
+ emojiCode: emojiCode,
122
+ emojiName: emojiName,
123
+ );
124
+ if (! emojiPickerContext.mounted) return ;
125
+ Navigator .of (emojiPickerContext).pop ();
126
+ } catch (e) {
127
+ debugPrint ('Error adding reaction: $e ' );
128
+ if (! emojiPickerContext.mounted) return ;
129
+
130
+ switch (e) {
131
+ case ZulipApiException ():
132
+ errorMessage = e.message;
133
+ // TODO specific messages for common errors, like network errors
134
+ // (support with reusable code)
135
+ default :
136
+ }
137
+
138
+ await showErrorDialog (context: emojiPickerContext,
139
+ title: 'Adding reaction failed' , message: errorMessage);
140
+ }
141
+ }));
140
142
});
141
143
};
142
144
}
0 commit comments