diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 92266e73..c225c677 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,5 +1,10 @@ ## Upcoming +🐞 Fixed + +- Show message custom actions on desktop context menu. +- Can move cursor by left/right arrow in StreamMessageInput on web/desktop. + ✅ Added - `VideoAttachment` now uses `thumbUrl` to show the thumbnail diff --git a/packages/stream_chat_flutter/lib/src/keyboard_shortcuts/keyboard_shortcut_runner.dart b/packages/stream_chat_flutter/lib/src/keyboard_shortcuts/keyboard_shortcut_runner.dart index 178c2690..706adad4 100644 --- a/packages/stream_chat_flutter/lib/src/keyboard_shortcuts/keyboard_shortcut_runner.dart +++ b/packages/stream_chat_flutter/lib/src/keyboard_shortcuts/keyboard_shortcut_runner.dart @@ -35,10 +35,11 @@ class KeyboardShortcutRunner extends StatelessWidget { return FocusableActionDetector( autofocus: true, shortcuts: { - enterKeySet: EnterKeyIntent(), - escapeKeySet: EscapeKeyIntent(), - rightArrowKeySet: RightArrowKeyIntent(), - leftArrowKeySet: LeftArrowKeyIntent(), + if (onEnterKeypress != null) enterKeySet: EnterKeyIntent(), + if (onEscapeKeypress != null) escapeKeySet: EscapeKeyIntent(), + if (onRightArrowKeypress != null) + rightArrowKeySet: RightArrowKeyIntent(), + if (onLeftArrowKeypress != null) leftArrowKeySet: LeftArrowKeyIntent(), }, actions: { EnterKeyIntent: CallbackAction( diff --git a/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart index 7d73fbfc..9a054e39 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart @@ -1033,6 +1033,11 @@ class _StreamMessageWidgetState extends State } }, ), + ...widget.customActions.map((e) => StreamChatContextMenuItem( + leading: e.leading, + title: e.title, + onClick: () => e.onTap?.call(widget.message), + )) ]; }