mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 22:48:41 +00:00
fix emoji reaction
This commit is contained in:
parent
7e680c99a3
commit
90d6b048f3
2 changed files with 4 additions and 2 deletions
|
|
@ -10,7 +10,6 @@ import 'package:twonly/src/database/twonly_database.dart';
|
|||
import 'package:twonly/src/model/json/message.dart';
|
||||
import 'package:twonly/src/model/protobuf/push_notification/push_notification.pbserver.dart';
|
||||
import 'package:twonly/src/services/api/messages.dart';
|
||||
import 'package:twonly/src/utils/log.dart';
|
||||
import 'package:twonly/src/utils/misc.dart';
|
||||
import 'package:twonly/src/views/camera/image_editor/data/layer.dart';
|
||||
import 'package:twonly/src/views/camera/image_editor/modules/all_emojis.dart';
|
||||
|
|
@ -48,7 +47,6 @@ class MessageContextMenu extends StatelessWidget {
|
|||
},
|
||||
) as EmojiLayerData?;
|
||||
if (layer == null) return;
|
||||
Log.info(layer.text);
|
||||
|
||||
await sendTextMessage(
|
||||
message.contactId,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:twonly/src/views/camera/image_editor/data/data.dart';
|
||||
|
||||
// animations from: https://googlefonts.github.io/noto-emoji-animation/
|
||||
// from https://github.com/eitanliu/emoji_regex/tree/master
|
||||
|
|
@ -9,6 +10,9 @@ RegExp emojiRegex() => RegExp(
|
|||
|
||||
bool isEmoji(String character) {
|
||||
final matches = emojiRegex().allMatches(character);
|
||||
if (emojis.contains(character)) {
|
||||
return true;
|
||||
}
|
||||
if (matches.length == 1) {
|
||||
final match = matches.first;
|
||||
return match.start == 0 && match.end == character.length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue