@@ -222,11 +222,19 @@ class ReactionButtons extends StatelessWidget {
222
222
: zulipLocalizations.errorReactionAddingFailedTitle);
223
223
}
224
224
225
+ void _onMorePressed () {
226
+ // Dismiss current action sheet before opening emoji picker sheet.
227
+ Navigator .of (pageContext).pop ();
228
+
229
+ showEmojiPickerSheet (pageContext: pageContext, message: message);
230
+ }
231
+
225
232
@override
226
233
Widget build (BuildContext context) {
227
234
assert (EmojiStore .popularEmojiCandidates.every (
228
235
(emoji) => emoji.emojiType == ReactionType .unicodeEmoji));
229
236
237
+ final zulipLocalizations = ZulipLocalizations .of (context);
230
238
final store = PerAccountStoreWidget .of (pageContext);
231
239
final designVariables = DesignVariables .of (context);
232
240
@@ -240,32 +248,57 @@ class ReactionButtons extends StatelessWidget {
240
248
241
249
return Container (
242
250
decoration: BoxDecoration (color: designVariables.contextMenuCancelBg),
243
- child: Row (
244
- spacing: 1 ,
245
- children: List .unmodifiable (EmojiStore .popularEmojiCandidates.mapIndexed ((index, emoji) {
246
- final isSelfVoted = hasSelfVote (emoji);
247
- return Flexible (child: InkWell (
248
- onTap: () => _onReactionPressed (emoji: emoji, isSelfVoted: isSelfVoted),
249
- splashFactory: NoSplash .splashFactory,
250
- borderRadius: index == 0
251
- ? const BorderRadius .only (topLeft: Radius .circular (7 ))
252
- : null ,
253
- overlayColor: WidgetStateColor .resolveWith ((states) =>
254
- states.any ((e) => e == WidgetState .pressed)
255
- ? designVariables.contextMenuItemBg.withFadedAlpha (0.20 )
256
- : Colors .transparent),
257
- child: Container (
258
- width: double .infinity,
259
- padding: const EdgeInsets .symmetric (vertical: 12 , horizontal: 5 ),
260
- alignment: Alignment .center,
261
- color: isSelfVoted
262
- ? designVariables.contextMenuItemBg.withFadedAlpha (0.20 )
251
+ child: Row (children: [
252
+ Flexible (child: Row (
253
+ spacing: 1 ,
254
+ children: List .unmodifiable (EmojiStore .popularEmojiCandidates.mapIndexed ((index, emoji) {
255
+ final isSelfVoted = hasSelfVote (emoji);
256
+ return Flexible (child: InkWell (
257
+ onTap: () => _onReactionPressed (emoji: emoji, isSelfVoted: isSelfVoted),
258
+ splashFactory: NoSplash .splashFactory,
259
+ borderRadius: index == 0
260
+ ? const BorderRadius .only (topLeft: Radius .circular (7 ))
263
261
: null ,
264
- child: UnicodeEmojiWidget (
265
- emojiDisplay: emoji.emojiDisplay as UnicodeEmojiDisplay ,
266
- notoColorEmojiTextSize: 20.1 ,
267
- size: 24 ))));
268
- }))));
262
+ overlayColor: WidgetStateColor .resolveWith ((states) =>
263
+ states.any ((e) => e == WidgetState .pressed)
264
+ ? designVariables.contextMenuItemBg.withFadedAlpha (0.20 )
265
+ : Colors .transparent),
266
+ child: Container (
267
+ width: double .infinity,
268
+ padding: const EdgeInsets .symmetric (vertical: 12 , horizontal: 5 ),
269
+ alignment: Alignment .center,
270
+ color: isSelfVoted
271
+ ? designVariables.contextMenuItemBg.withFadedAlpha (0.20 )
272
+ : null ,
273
+ child: UnicodeEmojiWidget (
274
+ emojiDisplay: emoji.emojiDisplay as UnicodeEmojiDisplay ,
275
+ notoColorEmojiTextSize: 20.1 ,
276
+ size: 24 ))));
277
+ })))),
278
+ InkWell (
279
+ onTap: _onMorePressed,
280
+ splashFactory: NoSplash .splashFactory,
281
+ borderRadius: const BorderRadius .only (topRight: Radius .circular (7 )),
282
+ overlayColor: WidgetStateColor .resolveWith ((states) =>
283
+ states.any ((e) => e == WidgetState .pressed)
284
+ ? designVariables.contextMenuItemBg.withFadedAlpha (0.20 )
285
+ : Colors .transparent),
286
+ child: Padding (
287
+ padding: const EdgeInsetsDirectional .fromSTEB (12 , 12 , 4 , 12 ),
288
+ child: Row (children: [
289
+ Text (zulipLocalizations.emojiReactionsMore,
290
+ textAlign: TextAlign .end,
291
+ style: TextStyle (
292
+ color: designVariables.contextMenuItemText,
293
+ fontSize: 14 ,
294
+ ).merge (weightVariableTextStyle (context, wght: 600 ))),
295
+ Icon (ZulipIcons .chevron_right,
296
+ color: designVariables.contextMenuItemText,
297
+ size: 24 ),
298
+ ]),
299
+ )),
300
+ ]),
301
+ );
269
302
}
270
303
}
271
304
0 commit comments