Skip to content

Remove loading status when failed max number of retries on queryChannels #1584

@ndb-allgravy

Description

@ndb-allgravy

We are reproducing an issue where the chat is stuck at the loading state for the ChannelList component (react-native-sdk).

By digging into what was the cause, we saw that even with offline data available, when our queries timed out, we still got loading state.

Is there an updated needed for { pagination: { isLoading: false }} here?

https://github.com/GetStream/stream-chat-js/blob/master/src/channel_manager.ts#L320

Curious about your reply, thank you!

EDIT: And checking further, the channels are empty too when falling in this case, while we could display the channels from offline data. Looks like it's caused by the client.sync() failing for same reason (timeout) with a bad connection, so seems like the offline data is getting wiped because the connection is bad.
https://github.com/GetStream/stream-chat-js/blob/master/src/offline-support/offline_sync_manager.ts#L159

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions