align with latest stable
This commit is contained in:
@@ -113,31 +113,35 @@ class _ChannelPageState extends State<ChannelPage> {
|
|||||||
initialAlignment: widget.initialAlignment,
|
initialAlignment: widget.initialAlignment,
|
||||||
highlightInitialMessage: widget.highlightInitialMessage,
|
highlightInitialMessage: widget.highlightInitialMessage,
|
||||||
onMessageSwiped: _reply,
|
onMessageSwiped: _reply,
|
||||||
onReplyTap: _reply,
|
messageBuilder: (context, details, messages, defaultMessage) {
|
||||||
|
return defaultMessage.copyWith(
|
||||||
|
onReplyTap: _reply,
|
||||||
|
onShowMessage: (m, c) async {
|
||||||
|
final client = StreamChat.of(context).client;
|
||||||
|
final message = m;
|
||||||
|
final channel = client.channel(
|
||||||
|
c.type,
|
||||||
|
id: c.id,
|
||||||
|
);
|
||||||
|
if (channel.state == null) {
|
||||||
|
await channel.watch();
|
||||||
|
}
|
||||||
|
Navigator.pushReplacementNamed(
|
||||||
|
context,
|
||||||
|
Routes.CHANNEL_PAGE,
|
||||||
|
arguments: ChannelPageArgs(
|
||||||
|
channel: channel,
|
||||||
|
initialMessage: message,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
threadBuilder: (_, parentMessage) {
|
threadBuilder: (_, parentMessage) {
|
||||||
return ThreadPage(
|
return ThreadPage(
|
||||||
parent: parentMessage,
|
parent: parentMessage,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onShowMessage: (m, c) async {
|
|
||||||
final client = StreamChat.of(context).client;
|
|
||||||
final message = m;
|
|
||||||
final channel = client.channel(
|
|
||||||
c.type,
|
|
||||||
id: c.id,
|
|
||||||
);
|
|
||||||
if (channel.state == null) {
|
|
||||||
await channel.watch();
|
|
||||||
}
|
|
||||||
Navigator.pushReplacementNamed(
|
|
||||||
context,
|
|
||||||
Routes.CHANNEL_PAGE,
|
|
||||||
arguments: ChannelPageArgs(
|
|
||||||
channel: channel,
|
|
||||||
initialMessage: message,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
pinPermissions: ['owner', 'admin', 'member'],
|
pinPermissions: ['owner', 'admin', 'member'],
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: ChannelImage(
|
child: ChannelAvatar(
|
||||||
channel: channel,
|
channel: channel,
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(maxWidth: 40.0, maxHeight: 40.0),
|
BoxConstraints(maxWidth: 40.0, maxHeight: 40.0),
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
import 'main.dart';
|
|
||||||
import 'routes/routes.dart';
|
import 'routes/routes.dart';
|
||||||
|
|
||||||
const kStreamApiKey = 'STREAM_API_KEY';
|
const kStreamApiKey = 'STREAM_API_KEY';
|
||||||
|
|||||||
@@ -49,7 +49,11 @@ class _ThreadPageState extends State<ThreadPage> {
|
|||||||
initialScrollIndex: widget.initialScrollIndex,
|
initialScrollIndex: widget.initialScrollIndex,
|
||||||
initialAlignment: widget.initialAlignment,
|
initialAlignment: widget.initialAlignment,
|
||||||
onMessageSwiped: _reply,
|
onMessageSwiped: _reply,
|
||||||
onReplyTap: _reply,
|
messageBuilder: (context, details, messages, defaultMessage) {
|
||||||
|
return defaultMessage.copyWith(
|
||||||
|
onReplyTap: _reply,
|
||||||
|
);
|
||||||
|
},
|
||||||
pinPermissions: ['owner', 'admin', 'member'],
|
pinPermissions: ['owner', 'admin', 'member'],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user