channel query on local notification was using event.type

This commit is contained in:
Salvatore Giordano
2020-11-09 09:43:47 +01:00
parent d8840956ed
commit 6613476700
3 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -69,8 +69,7 @@ void main() async {
final client = Client(
's2dxdhpxd94g',
logLevel: Level.INFO,
showLocalNotification:
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
showLocalNotification: (m, c) {},
persistenceEnabled: true,
);
+1 -1
View File
@@ -1,6 +1,6 @@
name: example
description: A new Flutter project.
version: 1.0.22+23
version: 1.0.23+24
environment:
sdk: ">=2.2.2 <3.0.0"
+3 -3
View File
@@ -186,10 +186,10 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
.listen((event) async {
var channel = client.state.channels[event.cid];
if (channel == null) {
if (channel != null) {
channel = client.channel(
event.type,
id: event.cid.split(':')[1],
event.channelType,
id: event.channelId,
);
await channel.query();
}