feat: Emoji related fixes
- adds Emoji autocomplete following popular `:` hotkey - adds Famedly's famous smart Emojis (tm) - syncs recent Emojis with SDK Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
5f5a08f729
commit
4b5bba1457
7 changed files with 500 additions and 12 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:emoji_proposal/emoji_proposal.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
|
|
@ -8,6 +9,7 @@ import 'package:fluffychat/pages/chat/chat.dart';
|
|||
|
||||
class ReactionsPicker extends StatelessWidget {
|
||||
final ChatController controller;
|
||||
|
||||
const ReactionsPicker(this.controller, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -26,7 +28,13 @@ class ReactionsPicker extends StatelessWidget {
|
|||
if (!display) {
|
||||
return Container();
|
||||
}
|
||||
final emojis = List<String>.from(AppEmojis.emojis);
|
||||
final proposals = proposeEmojis(
|
||||
controller.selectedEvents.first.plaintextBody,
|
||||
number: 25,
|
||||
languageCodes: EmojiProposalLanguageCodes.values.toSet());
|
||||
final emojis = proposals.isNotEmpty
|
||||
? proposals.map((e) => e.char).toList()
|
||||
: List<String>.from(AppEmojis.emojis);
|
||||
final allReactionEvents = controller.selectedEvents.first
|
||||
.aggregatedEvents(
|
||||
controller.timeline!, RelationshipTypes.reaction)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue