stream-chat-flutter icon indicating copy to clipboard operation
stream-chat-flutter copied to clipboard

Show in chat and Reply not working

Open tarunkhatri opened this issue 4 years ago • 2 comments

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, Android

What version are you using?

4.2.0

What happened?

Show in chat is not working and Reply is just closing detail screen. Please add some parameters so that we can show/hide these buttons or just add some functionality for them thanks. untitled

Steps to reproduce

1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
...

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

tarunkhatri avatar Jun 16 '22 12:06 tarunkhatri

Hi! You can hide the Reply button with showReplyMessage parameter of the StreamMessageWidget. You can provide this parameter by setting it in the messageBuilder of the StreamMessageListView.

StreamMessageListView(
        ....
        messageBuilder: BuildContext context, BaseProfile artist, StreamMessageInputController? inputController) {
               return widget.copyWith(showReplyMessage: false);
        },
      ),

Oh, I see the problem. It is attachment viewer.

arteminthesky avatar Jun 23 '22 21:06 arteminthesky

Hi We're improving this in v5, but you can still use it at the moment

StreamMessageListView(
                messageBuilder:
                    (context, details, messages, defaultMessageWidget) {
                  return defaultMessageWidget.copyWith(onReplyTap: _reply);
                },
              )

Basically, you need to pass the onReplyTap callback to the message widget

imtoori avatar Jul 15 '22 09:07 imtoori