From ac4a60ebb75d52f57fabb1efad324c1a74609f09 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 7 Dec 2020 13:02:10 +0100 Subject: [PATCH 1/3] do not wrap custom channel preview builder to avoid weird behaviour --- lib/src/channel_list_view.dart | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/lib/src/channel_list_view.dart b/lib/src/channel_list_view.dart index d6621d51..33988b92 100644 --- a/lib/src/channel_list_view.dart +++ b/lib/src/channel_list_view.dart @@ -316,28 +316,9 @@ class _ChannelListViewState extends State builder: (context) { Widget child; if (widget.channelPreviewBuilder != null) { - child = Stack( - children: [ - widget.channelPreviewBuilder( - context, - channel, - ), - Positioned.fill( - child: Material( - color: Colors.transparent, - child: InkWell( - onTap: () { - onTap(channel, widget.channelWidget); - }, - onLongPress: widget.onChannelLongPress != null - ? () { - widget.onChannelLongPress(channel); - } - : null, - ), - ), - ), - ], + child = widget.channelPreviewBuilder( + context, + channel, ); } else { child = ChannelPreview( From b5b35031d9aa5455598dc3ed704bec196ce15efa Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 7 Dec 2020 13:08:11 +0100 Subject: [PATCH 2/3] fix messageinput autofocus --- .vscode/launch.json | 19 +++++++++++++++++++ lib/src/message_input.dart | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..eb658d4d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "stream-chat-flutter", + "request": "launch", + "type": "dart" + }, + { + "name": "example", + "cwd": "example", + "request": "launch", + "type": "dart" + } + ] +} \ No newline at end of file diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart index fefb5209..6836d466 100644 --- a/lib/src/message_input.dart +++ b/lib/src/message_input.dart @@ -95,7 +95,7 @@ class MessageInput extends StatefulWidget { this.attachmentThumbnailBuilders, this.inputTextStyle, this.attachmentIconColor, - this.autofocus, + this.autofocus = false, }) : super(key: key); /// Message to edit @@ -262,7 +262,7 @@ class MessageInputState extends State { }); }, style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2, - autofocus: widget.autofocus ?? false, + autofocus: widget.autofocus, decoration: InputDecoration( hintText: 'Write a message', hintStyle: From c51ebd12dda1b265aea8f58a2899ab8035eb6468 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 7 Dec 2020 13:09:53 +0100 Subject: [PATCH 3/3] version bp --- CHANGELOG.md | 5 +++++ pubspec.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7281206..4778f4c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.16 + +- Do not wrap channel preview builder. Users will have to implement they're custom onTap/onLongPress implementation +- Make public autofocus field of the TextField of message_input + ## 0.2.15 - Add onLongPress on channel when using custom channel builder diff --git a/pubspec.yaml b/pubspec.yaml index 2fe6110b..583874c2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter homepage: https://github.com/GetStream/stream-chat-flutter description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. -version: 0.2.15 +version: 0.2.16 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues