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 logic to update recently viewed documents #179

Merged
merged 3 commits into from
May 19, 2023

Conversation

jfreda
Copy link
Collaborator

@jfreda jfreda commented May 18, 2023

Users' recently viewed documents were not being updated correctly in all cases. Taking a look at this logic again, I found that we weren't gating the updates of recently viewed docs for draft documents on when the Add-To-Recently-Viewed header is present (like we do for non-draft docs), which could potentially have strange consequences. Also the logic to update recently viewed docs itself wasn't sorting results correctly, which I believe was the main cause for the incorrect behavior.

@jfreda jfreda requested a review from a team as a code owner May 18, 2023 22:02
@jfreda jfreda merged commit cb68f66 into main May 19, 2023
@jfreda jfreda deleted the jfreda/fix-recently-viewed-docs branch May 19, 2023 20:07
anuragprafulla pushed a commit to razorpay/hermes that referenced this pull request Jun 27, 2023
* Fix logic to update recently viewed documents

* Only update recently viewed docs for a draft view event when header is present

* Pass 'Add-To-Recently-Viewed' header for draft view events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants