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: use the correct query key to update reading history cache #2195

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

DragosIorgulescu
Copy link
Contributor

Changes

self explanatory

Events

N / A

Manual Testing

On those affected packages:

  • Have you done sanity checks in the webapp?
  • Have you done sanity checks in the extension?
  • Does this not break anything in companion?

Did you test the modified components media queries?

  • MobileL (420px)
  • Tablet (656px)
  • Laptop (1020px)

Did you test on actual mobile devices?

  • iOS (Chrome and Safari)
  • Android

WT-1841 #done

Comment on lines +52 to +53
const { node } = history?.pages[page].readHistory.edges[edge] || {};
const updated = { ...node, post: { ...node?.post, ...post } };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main fix is using the correct query key as seen below, but still making sure this does not break if for some reason history ends up undefined is a good idea IMO

@rebelchris rebelchris requested a review from a team September 19, 2023 10:04
@DragosIorgulescu DragosIorgulescu enabled auto-merge (squash) September 19, 2023 13:58
@DragosIorgulescu DragosIorgulescu merged commit 0ccc70e into WT-1778-move-to-react Sep 19, 2023
3 of 4 checks passed
@DragosIorgulescu DragosIorgulescu deleted the WT-1841-read-history-bookmark branch September 19, 2023 13:58
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