fix(core): fix stream channel shows black screen while loading.

Signed-off-by: xsahil03x <xdsahil@gmail.com>
This commit is contained in:
Sahil Kumar
2023-05-31 16:47:51 +05:30
committed by xsahil03x
parent a14731feea
commit e9ef9fcf41
@@ -251,14 +251,14 @@ class StreamChannelState extends State<StreamChannel> {
channel.state!.truncate();
if (messageId == null) {
await channel.query(
final state = await channel.query(
messagesPagination: PaginationParams(
limit: limit,
),
preferOffline: preferOffline,
);
channel.state!.isUpToDate = true;
return null;
return state;
}
return channel.query(
@@ -451,7 +451,7 @@ class StreamChannelState extends State<StreamChannel> {
return widget.child;
},
);
if (initialMessageId != null) {
if (_futures.length > 1) {
child = Material(child: child);
}
return child;