fix(core): fix index check for channel channelList availablitity.

This commit is contained in:
Sahil Kumar
2023-06-16 15:40:29 +05:30
committed by GitHub
parent 42ac263ca5
commit b341d66a89
@@ -108,7 +108,7 @@ class StreamChannelListEventHandler {
final channels = [...controller.currentItems];
final channelIndex = channels.indexWhere((it) => it.cid == channelCid);
if (channelIndex <= 0) {
if (channelIndex < 0) {
// If the channel is not in the list, It might be hidden.
// So, we just refresh the list.
await controller.refresh(resetValue: false);