Merge pull request #916 from GetStream/feat/default_image_tap

fix(ui): Clicking on Avatar in ChannelPreview should go to Channel route by default
This commit is contained in:
Ayush Shekhar
2022-02-24 16:54:47 +05:30
committed by GitHub
2 changed files with 6 additions and 3 deletions
@@ -5,6 +5,7 @@
- [[#888]](https://github.com/GetStream/stream-chat-flutter/issues/888) Fix `unban` command not working in `MessageInput`.
- [[#805]](https://github.com/GetStream/stream-chat-flutter/issues/805) Updated chewie dependency version to 1.3.0
- Fix `showScrollToBottom` in `MessageListView` not respecting false value.
- Fix default `Channel` route not opening from `ChannelListView` when `ChannelAvatar` is tapped
## 3.4.0
- Updated `stream_chat_flutter_core` dependency to [`3.4.0`](https://pub.dev/packages/stream_chat_flutter_core/changelog).
@@ -599,7 +599,9 @@ class _ChannelListViewState extends State<ChannelListView> {
child: ChannelPreview(
onLongPress: widget.onChannelLongPress,
channel: channel,
onImageTap: () => widget.onImageTap?.call(channel),
onImageTap: widget.onImageTap != null
? () => widget.onImageTap!(channel)
: null,
onTap: (channel) => onTap(channel, widget.channelWidget),
),
),
@@ -612,7 +614,7 @@ class _ChannelListViewState extends State<ChannelListView> {
if (widget.onChannelTap != null) {
onTap = widget.onChannelTap!;
} else {
onTap = (client, _) {
onTap = (channel, _) {
if (widget.channelWidget == null) {
return;
}
@@ -620,7 +622,7 @@ class _ChannelListViewState extends State<ChannelListView> {
context,
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: client,
channel: channel,
child: widget.channelWidget!,
),
),