added option to choose more emoji reactions #55

Merged
MineTec merged 8 commits from develop-moreEmojiReactions into develop 2024-04-02 16:51:33 +00:00
Showing only changes of commit 07401d0864 - Show all commits

View File

@ -218,7 +218,7 @@ class _ChatBubbleState extends State<ChatBubble> {
IconButton( IconButton(
onPressed: () { onPressed: () {
showDialog(context: context, builder: (context) { showDialog(context: context, builder: (context) {
return SimpleDialog( return AlertDialog(
contentPadding: const EdgeInsets.all(15), contentPadding: const EdgeInsets.all(15),
titlePadding: const EdgeInsets.only(left: 6, top: 15), titlePadding: const EdgeInsets.only(left: 6, top: 15),
title: Row( title: Row(
@ -230,11 +230,69 @@ class _ChatBubbleState extends State<ChatBubble> {
}, },
icon: const Icon(Icons.arrow_back), icon: const Icon(Icons.arrow_back),
), ),
const SizedBox( const SizedBox(width: 10),
width: 10, const Text('Emoji auswählen'),
height: 0, ],
child: null,
), ),
content: SizedBox(
width: 256,
height: 270,
child: Column(
Pupsi marked this conversation as resolved
Review

wofür existiert diese column?

wofür existiert diese column?
children: [
emojis.EmojiPicker(
config: emojis.Config(
height: 256,
swapCategoryAndBottomBar: true,
emojiViewConfig: emojis.EmojiViewConfig(
backgroundColor: Theme.of(context).canvasColor,
recentsLimit: 67,
emojiSizeMax: 19,
noRecents: const Text('Keine zuletzt verwendeten Emojis'),
),
bottomActionBarConfig: emojis.BottomActionBarConfig(
showBackspaceButton: false,
backgroundColor: Theme.of(context).hoverColor.withAlpha(50),
buttonColor: Theme.of(context).dividerColor.withAlpha(70),
),
categoryViewConfig: emojis.CategoryViewConfig(
backgroundColor: Theme.of(context).hoverColor,
iconColorSelected: Theme.of(context).primaryColor,
indicatorColor: Theme.of(context).primaryColor,
),
searchViewConfig: emojis.SearchViewConfig(
backgroundColor: Theme.of(context).dividerColor,
buttonColor: Theme.of(context).dividerColor,
hintText: 'Suchen',
buttonIconColor: Colors.white,
),
),
onEmojiSelected: (emojis.Category? category, emojis.Emoji emoji) {
Navigator.of(context).pop();
Navigator.of(context).pop();
ReactMessage(
chatToken: widget.chatData.token,
messageId: widget.bubbleData.id,
params: ReactMessageParams(emoji.emoji),
).run().then((value) => widget.refetch(renew: true));
},
),
],
),
),
);
/*return SimpleDialog(
contentPadding: const EdgeInsets.all(15),
titlePadding: const EdgeInsets.only(left: 6, top: 15),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
const SizedBox(width: 10),
const Text('Emoji auswählen'), const Text('Emoji auswählen'),
], ],
), ),
@ -242,11 +300,8 @@ class _ChatBubbleState extends State<ChatBubble> {
Column( Column(
children: [ children: [
emojis.EmojiPicker( emojis.EmojiPicker(
onBackspacePressed: () {
null;
},
config: emojis.Config( config: emojis.Config(
height: 256, //height: 256,
swapCategoryAndBottomBar: true, swapCategoryAndBottomBar: true,
emojiViewConfig: emojis.EmojiViewConfig( emojiViewConfig: emojis.EmojiViewConfig(
backgroundColor: Theme.of(context).canvasColor, backgroundColor: Theme.of(context).canvasColor,
@ -280,15 +335,11 @@ class _ChatBubbleState extends State<ChatBubble> {
).run().then((value) => widget.refetch(renew: true)); ).run().then((value) => widget.refetch(renew: true));
}, },
), ),
const SizedBox( const SizedBox(height: 25),
width: 1,
height: 25,
child: null,
)
], ],
), ),
], ],
); );*/
}); });
}, },
style: IconButton.styleFrom( style: IconButton.styleFrom(