-
-
Notifications
You must be signed in to change notification settings - Fork 639
fix: email visibility issue when moving between folders #949
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
base: staging
Are you sure you want to change the base?
Conversation
When moving an email from one folder to another, the email wasn't immediately visible in the destination folder without a page refresh. This was because React Query's default invalidation only triggers refetches for "active" queries, and the destination folder's query wasn't active at the time of invalidation. This commit modifies the useMoveTo hook to invalidate the query for the destination folder after a move operation, ensuring that when a user navigates to the destination folder, the query is marked as stale and will be automatically refetched, making the moved email immediately visible without requiring a page refresh.
@gitstart is attempting to deploy a commit to the Zero Team on Vercel. A member of the Team first needs to authorize it. |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Please use the new syntax
|
You need to invalidate using the |
Description
useMoveTo
hook to invalidate the query for the destination folder after a move operation, ensuring that when a user navigates to the destination folder, the query is marked as stale and will be automatically refetched, making the moved email immediately visible without requiring a page refresh.Type of Change
Areas Affected
Testing Done
Security Considerations
N/A
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.