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( final client = Client(
's2dxdhpxd94g', 's2dxdhpxd94g',
logLevel: Level.INFO, logLevel: Level.INFO,
showLocalNotification: showLocalNotification: (m, c) {},
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
persistenceEnabled: true, persistenceEnabled: true,
); );
+1 -1
View File
@@ -1,6 +1,6 @@
name: example name: example
description: A new Flutter project. description: A new Flutter project.
version: 1.0.22+23 version: 1.0.23+24
environment: environment:
sdk: ">=2.2.2 <3.0.0" 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 { .listen((event) async {
var channel = client.state.channels[event.cid]; var channel = client.state.channels[event.cid];
if (channel == null) { if (channel != null) {
channel = client.channel( channel = client.channel(
event.type, event.channelType,
id: event.cid.split(':')[1], id: event.channelId,
); );
await channel.query(); await channel.query();
} }