From 67dad76e46d90cd23d761cfb997ea2fc01b83fea Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Wed, 23 Mar 2022 16:33:20 +0530 Subject: [PATCH] feat(ui): improve the message for skipping the event. Signed-off-by: xsahil03x --- .../lib/src/stream_channel_list_controller.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart b/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart index 7fa3b2263..9fe5594c9 100644 --- a/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart +++ b/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart @@ -220,8 +220,10 @@ class StreamChannelListController extends PagedValueNotifier { _unsubscribeFromChannelListEvents(); } - _channelEventSubscription = client.on().skip(1) // skip the initial event - .listen((event) { + _channelEventSubscription = + client.on().skip(1) // Skipping the last emitted event. + // We only need to handle the latest events. + .listen((event) { // Returns early if the event is already handled by the listener. if (eventListener?.call(event) ?? false) return;