Skip to content

Commit

Permalink
Merge pull request #168 from GetStream/hotfix/channelPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
xsahil03x authored Dec 7, 2020
2 parents d3126f1 + c51ebd1 commit ea7c0f1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 3 additions & 22 deletions lib/src/channel_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,28 +316,9 @@ class _ChannelListViewState extends State<ChannelListView>
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(
Expand Down
4 changes: 2 additions & 2 deletions lib/src/message_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -262,7 +262,7 @@ class MessageInputState extends State<MessageInput> {
});
},
style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
autofocus: widget.autofocus ?? false,
autofocus: widget.autofocus,
decoration: InputDecoration(
hintText: 'Write a message',
hintStyle:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit ea7c0f1

Please sign in to comment.