liste for notificationRemovedFromChannel

This commit is contained in:
Salvatore Giordano
2020-05-20 09:50:08 +02:00
parent 4312e3133b
commit 69da934877
+7
View File
@@ -140,6 +140,13 @@ class ChannelsBlocState extends State<ChannelsBloc>
await channel.watch();
_channelsController.add(List.from(channels..insert(0, channel)));
}));
_subscriptions.add(
client.on(EventType.notificationRemovedFromChannel).listen((e) async {
final channelModel = e.channel;
_channelsController.add(
List.from(channels..removeWhere((c) => c.cid == channelModel.cid)));
}));
}
@override