fix(llc): queryChannels should only throw if we do-not have any channels in cache (#394)
* fix(llc): queryChannel should throw exception if client is not yet connected Signed-off-by: Sahil Kumar <[email protected]> * prepare llc for v1.5.2 Signed-off-by: Sahil Kumar <[email protected]> * fix queryChannelOnline invocation conditions Signed-off-by: Sahil Kumar <[email protected]> * fix package version Signed-off-by: Sahil Kumar <[email protected]> * queryChannels should only throw if we do-not have any channels in cache Signed-off-by: Sahil Kumar <[email protected]> * update changelog with the correct fix Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -633,7 +633,7 @@ class StreamChatClient {
|
||||
);
|
||||
if (channels.isNotEmpty) yield channels;
|
||||
|
||||
if (wsConnectionStatus == ConnectionStatus.connected) {
|
||||
try {
|
||||
final newQueryChannelsFuture = queryChannelsOnline(
|
||||
filter: filter,
|
||||
sort: sort,
|
||||
@@ -648,6 +648,8 @@ class StreamChatClient {
|
||||
_queryChannelsStreams[hash] = newQueryChannelsFuture;
|
||||
|
||||
yield await newQueryChannelsFuture;
|
||||
} catch (_) {
|
||||
if (channels.isEmpty) rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user