mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 10:58:40 +00:00
fix push notification
This commit is contained in:
parent
e0b3893d37
commit
c44e0a11e3
2 changed files with 15 additions and 10 deletions
|
|
@ -6,8 +6,11 @@ import 'package:twonly/src/database/twonly_database.dart';
|
|||
import 'package:twonly/src/model/json/message.dart';
|
||||
|
||||
class ReactionRow extends StatefulWidget {
|
||||
const ReactionRow(
|
||||
{super.key, required this.otherReactions, required this.message});
|
||||
const ReactionRow({
|
||||
super.key,
|
||||
required this.otherReactions,
|
||||
required this.message,
|
||||
});
|
||||
|
||||
final List<Message> otherReactions;
|
||||
final Message message;
|
||||
|
|
|
|||
|
|
@ -140,14 +140,16 @@ class MessageContextMenu extends StatelessWidget {
|
|||
responseToOtherMessageId: (message.messageOtherId == null)
|
||||
? message.messageId
|
||||
: null),
|
||||
PushNotification(
|
||||
kind: (message.kind == MessageKind.textMessage)
|
||||
? PushKind.reactionToText
|
||||
: (getMediaContent(message)!.isVideo)
|
||||
? PushKind.reactionToVideo
|
||||
: PushKind.reactionToText,
|
||||
reactionContent: layer.text,
|
||||
),
|
||||
(message.messageOtherId != null)
|
||||
? PushNotification(
|
||||
kind: (message.kind == MessageKind.textMessage)
|
||||
? PushKind.reactionToText
|
||||
: (getMediaContent(message)!.isVideo)
|
||||
? PushKind.reactionToVideo
|
||||
: PushKind.reactionToImage,
|
||||
reactionContent: layer.text,
|
||||
)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
child: const FaIcon(FontAwesomeIcons.faceLaugh),
|
||||
|
|
|
|||
Loading…
Reference in a new issue