Fix flickering issues due to reconnecting loop
This commit is contained in:
@@ -94,8 +94,12 @@ class RealtimeController extends ChangeNotifier {
|
||||
/// Convenience callback suitable for [StreamRecoveryWrapper.onStatusChanged].
|
||||
///
|
||||
/// Routes [StreamConnectionStatus] to the appropriate mark method.
|
||||
/// Both `connected` and `polling` are treated as "recovered" because
|
||||
/// polling is a functional fallback that still delivers data — the user
|
||||
/// doesn't need to see a reconnection indicator while data flows via REST.
|
||||
void handleChannelStatus(String channel, StreamConnectionStatus status) {
|
||||
if (status == StreamConnectionStatus.connected) {
|
||||
if (status == StreamConnectionStatus.connected ||
|
||||
status == StreamConnectionStatus.polling) {
|
||||
markChannelRecovered(channel);
|
||||
} else {
|
||||
markChannelRecovering(channel);
|
||||
|
||||
Reference in New Issue
Block a user