Skip to content

fix(sample-app): for the loading status which did not return to false when the list of attachments or pinned messages was empty#2459

Merged
santhoshvai merged 1 commit intoGetStream:developfrom
sn4f:fix/infinity-loader-at-pinned-or-attachements-screen
Apr 1, 2024
Merged

fix(sample-app): for the loading status which did not return to false when the list of attachments or pinned messages was empty#2459
santhoshvai merged 1 commit intoGetStream:developfrom
sn4f:fix/infinity-loader-at-pinned-or-attachements-screen

Conversation

@sn4f
Copy link
Copy Markdown
Contributor

@sn4f sn4f commented Mar 16, 2024

🎯 Goal

The goal of this change is to fix a bug in the usePaginatedAttachments and usePaginatedPinnedMessages hooks. This bug caused the loading state to not be reset to false for empty lists. As a result, the empty list indicator could not be displayed.

🛠 Implementation details

The change consists of adding the following code to both hooks:
setLoading(false)

🧪 Testing

  1. Create a new chat without any messages.
  2. Open the screen with attachments or pinned messages.
  3. Notice that the empty state is not visible. This is because the loading state is still true even though there are no results and the data has finished loading from the API.

…t of attachments or pinned messages was empty
@sn4f sn4f changed the title Fix for the loading status which did not return to false when the list of attachments or pinned messages was empty fix: for the loading status which did not return to false when the list of attachments or pinned messages was empty Mar 16, 2024
@santhoshvai santhoshvai changed the title fix: for the loading status which did not return to false when the list of attachments or pinned messages was empty fix(sample-app): for the loading status which did not return to false when the list of attachments or pinned messages was empty Apr 1, 2024
@santhoshvai santhoshvai merged commit d99471a into GetStream:develop Apr 1, 2024
@stream-ci-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants