fix: add back emoji button (#1886)
This commit is contained in:
parent
939e70ef75
commit
ea2896c3dc
1 changed files with 11 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fluffychat/pangea/events/models/pangea_token_model.dart';
|
||||
import 'package:fluffychat/pangea/toolbar/enums/activity_type_enum.dart';
|
||||
import 'package:fluffychat/pangea/toolbar/widgets/practice_activity/word_zoom_activity_button.dart';
|
||||
|
||||
class EmojiPracticeButton extends StatelessWidget {
|
||||
|
|
@ -15,14 +16,22 @@ class EmojiPracticeButton extends StatelessWidget {
|
|||
super.key,
|
||||
});
|
||||
|
||||
bool get _shouldDoActivity => token.shouldDoActivity(
|
||||
a: ActivityTypeEnum.emoji,
|
||||
feature: null,
|
||||
tag: null,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final emoji = token.getEmoji();
|
||||
return emoji != null
|
||||
return _shouldDoActivity || emoji != null
|
||||
? SizedBox(
|
||||
width: 40,
|
||||
child: WordZoomActivityButton(
|
||||
icon: Text(emoji),
|
||||
icon: emoji == null
|
||||
? const Icon(Icons.add_reaction_outlined)
|
||||
: Text(emoji),
|
||||
isSelected: isSelected,
|
||||
onPressed: onPressed,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue