minor fixes

This commit is contained in:
Salvatore Giordano
2021-11-29 16:29:22 +01:00
parent 85c29992e5
commit 3bd545e504
2 changed files with 5 additions and 3 deletions
@@ -1168,7 +1168,9 @@ class MessageInputState extends State<MessageInput> {
}
Widget _buildMentionsOverlayEntry() {
if (textEditingController.value.selection.start < 0) {
final channel = StreamChannel.of(context).channel;
if (textEditingController.value.selection.start < 0 ||
channel.state == null) {
return const Offstage();
}
@@ -1197,7 +1199,7 @@ class MessageInputState extends State<MessageInput> {
query: query,
mentionAllAppUsers: widget.mentionAllAppUsers,
client: StreamChat.of(context).client,
channel: StreamChannel.of(context).channel,
channel: channel,
size: Size(renderObject.size.width - 16, 400),
mentionsTileBuilder: tileBuilder,
onMentionUserTap: (user) {