fix push notification

This commit is contained in:
otsmr 2025-06-26 00:40:42 +02:00
parent e0b3893d37
commit c44e0a11e3
2 changed files with 15 additions and 10 deletions

View file

@ -6,8 +6,11 @@ import 'package:twonly/src/database/twonly_database.dart';
import 'package:twonly/src/model/json/message.dart'; import 'package:twonly/src/model/json/message.dart';
class ReactionRow extends StatefulWidget { class ReactionRow extends StatefulWidget {
const ReactionRow( const ReactionRow({
{super.key, required this.otherReactions, required this.message}); super.key,
required this.otherReactions,
required this.message,
});
final List<Message> otherReactions; final List<Message> otherReactions;
final Message message; final Message message;

View file

@ -140,14 +140,16 @@ class MessageContextMenu extends StatelessWidget {
responseToOtherMessageId: (message.messageOtherId == null) responseToOtherMessageId: (message.messageOtherId == null)
? message.messageId ? message.messageId
: null), : null),
PushNotification( (message.messageOtherId != null)
? PushNotification(
kind: (message.kind == MessageKind.textMessage) kind: (message.kind == MessageKind.textMessage)
? PushKind.reactionToText ? PushKind.reactionToText
: (getMediaContent(message)!.isVideo) : (getMediaContent(message)!.isVideo)
? PushKind.reactionToVideo ? PushKind.reactionToVideo
: PushKind.reactionToText, : PushKind.reactionToImage,
reactionContent: layer.text, reactionContent: layer.text,
), )
: null,
); );
}, },
child: const FaIcon(FontAwesomeIcons.faceLaugh), child: const FaIcon(FontAwesomeIcons.faceLaugh),