fix: in empty content token practice button in emoji mode, always show user set emoji (#5633)

This commit is contained in:
ggurdin 2026-02-10 12:43:55 -05:00 committed by GitHub
parent 34d38ca0e3
commit b4ae6ca770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -255,12 +255,14 @@ class _NoActivityContentButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (practiceMode == MessagePracticeMode.wordEmoji && target != null) {
final displayEmoji =
PracticeRecordController.correctResponse(target!, token)?.text ??
token.vocabConstructID.userSetEmoji ??
'';
return Text(displayEmoji, style: emojiStyle);
if (practiceMode == MessagePracticeMode.wordEmoji) {
String? displayEmoji = token.vocabConstructID.userSetEmoji;
if (target != null) {
displayEmoji =
PracticeRecordController.correctResponse(target!, token)?.text ??
displayEmoji;
}
return Text(displayEmoji ?? '', style: emojiStyle);
}
if (practiceMode == MessagePracticeMode.wordMorph && target != null) {
final morphFeature = target!.morphFeature!;