Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue with filtering favorite reciters not updating after changes. #1376

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

YassinNouh21
Copy link
Contributor

@YassinNouh21 YassinNouh21 commented Oct 17, 2024

📝 Summary

This PR fixes an issue where the filteredFavoriteReciters list was not updated after changes, ensuring synchronization between the filtered reciter and favorite reciter lists after adding or removing a favorite.

This PR for issue

Description

  • Introduced _currentQuery and _isAllReciters to track the current search state.
  • Updated the logic in setSearchQuery to debounce and recalculate the filtered lists.
  • Synchronized both the filteredReciters and filteredFavoriteReciters when modifying the favorite reciters list.
  • Ensured that both regular and favorite reciters are updated when the favorite list changes or when a new search query is set.

Checklist:

  • Coding Standards: I have reviewed my code to ensure it follows the project's coding standards.
  • Testing: I have tested the changes and they work as expected.
  • Merge Conflicts: I have resolved any merge conflicts with the latest main/development branch.
  • Branch Status: The branch is up-to-date with the target branch (main/development).

- Ensure `filteredFavoriteReciters` is recalculated when a new favorite reciter is added.
- Synchronize filtered reciters and favorite reciters based on search query after adding/removing a favorite.
- Added `_currentQuery` and `_isAllReciters` to maintain the current state of the search filter and reciter list.
- Updated `setSearchQuery` and `_updateFilteredReciters` to properly reflect changes in both regular and favorite reciters.
@YassinNouh21 YassinNouh21 self-assigned this Oct 17, 2024
@YassinNouh21 YassinNouh21 added the bug Something isn't working label Oct 17, 2024
Copy link
Contributor

@ghassenbenzahra123 ghassenbenzahra123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ghassenbenzahra123 ghassenbenzahra123 merged commit 024fafa into main Oct 17, 2024
1 check passed
@ghassenbenzahra123 ghassenbenzahra123 deleted the fix/favorite-reciter-filtering-bug branch October 17, 2024 11:19
YassinNouh21 added a commit that referenced this pull request Oct 17, 2024
…s. (#1376)

- Ensure `filteredFavoriteReciters` is recalculated when a new favorite reciter is added.
- Synchronize filtered reciters and favorite reciters based on search query after adding/removing a favorite.
- Added `_currentQuery` and `_isAllReciters` to maintain the current state of the search filter and reciter list.
- Updated `setSearchQuery` and `_updateFilteredReciters` to properly reflect changes in both regular and favorite reciters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants