Merge branch 'develop' into refactor/deprecate-v3

This commit is contained in:
Salvatore Giordano
2022-03-17 10:18:58 +01:00
12 changed files with 57 additions and 23 deletions
@@ -1926,7 +1926,6 @@ class ChannelClientState {
readList.add(Read(
user: event.user!,
lastRead: event.createdAt,
unreadMessages: event.totalUnreadCount ?? 0,
));
_channelState = _channelState.copyWith(read: readList);
}
+11 -3
View File
@@ -190,8 +190,12 @@ class WebSocket with TimerHelper {
_connectionStatus = ConnectionStatus.connecting;
connectionCompleter = Completer<Event>();
final uri = await _buildUri();
_initWebSocketChannel(uri);
try {
final uri = await _buildUri();
_initWebSocketChannel(uri);
} catch (e, stk) {
_onConnectionError(e, stk);
}
return connectionCompleter!.future;
}
@@ -216,7 +220,11 @@ class WebSocket with TimerHelper {
Duration(milliseconds: delay),
() async {
final uri = await _buildUri(refreshToken: refreshToken);
_initWebSocketChannel(uri);
try {
_initWebSocketChannel(uri);
} catch (e, stk) {
_onConnectionError(e, stk);
}
},
);
}