-
Notifications
You must be signed in to change notification settings - Fork 37
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] Keep playstreak quests in sync #1111
Conversation
recheck |
All contributors have signed the CLA ✍️ ✅ |
useEffect(() => { | ||
const initSync = async () => { | ||
try { | ||
questPlayStreakSyncState.init({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only place it is used, so it is simpler to just call init right before. I initially explored adding it to StoreController
, but the StoreController
useEffect
executes after this useEffect, which breaks keepProjectQuestsInSync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how interesting, in my implementation of this in the store I used the StoreController approach
tbh I think this way is simpler and does the work too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should move this into @hyperplay/quests-ui
if it will be used on the store as well
appQueryClient: queryClient | ||
}) | ||
|
||
await questPlayStreakSyncState.keepProjectQuestsInSync(appName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearAllTimers
does not need to be called since the store and timers are destroyed when the overlay is closed, which is also when we should stop syncing play sessions
@nyghtstalker Ready for a retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Confirmed that quests are moving to the claimable section when ready to be claimed
- Confirmed the claim button activates and is useable when quest is claimable
- Confirmed claim button works and reward can be claimed
- Confirmed that when the timer for the days completion is finished it will add and display the day to the count and be claimable if reaching the set day amount needed.
Summary
Brings in HyperPlay-Gaming/quests-ui#19
desktop client implementation of https://github.com/HyperPlay-Gaming/product-management/issues/657
Testing
https://app.qase.io/case/HC-378