-
Notifications
You must be signed in to change notification settings - Fork 113
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
[PAY-3850][PAY-3849] Add listen streak noti on web #11379
Conversation
|
const messages = { | ||
amountEarned: (amount: BNAudio) => | ||
`You've earned ${formatNumberCommas(Number(amount.toString()))} $AUDIO`, | ||
`You've earned ${formatNumber(amount)} $AUDIO`, |
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.
lols should we add this as an extra util fn?? nah...
case ChallengeName.ListenStreakEndless: { | ||
const amountEarned = Number(formatNumber(amount)) | ||
if (amountEarned > 1) { | ||
return `You've earned ${amountEarned} $AUDIO for hitting Day ${listenStreak} of your listening streak! You’ll now earn an additional $AUDIO reward for every day you keep your streak going!` |
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.
let's pull this out to a messages
thing
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.
approve pending the messages comment
[7d310ef] [PAY-3850][PAY-3849] Add listen streak noti on web (#11379) Farid Salau [03d7f9e] [PAY-3946] Fix multiple plays in same batch breaking listen streak (#11380) Reed [4066498] [C-5782, C-5783] Add user comments endpoint and tan query hook (#11366) Kyle Shanks [0342ae5] fix integration test (#11378) alecsavvy
[f7023af] [QA-1995] Fix manager mode dropdown rendering off screen (#11442) Randy Schott [b250f91] Re-enable redux cache sync to tan-query (#11441) Andrew Mendelsohn [0868942] Remove hcaptcha from mobile (#11438) Reed [02fc876] [C-5796] Add empty state for comment history (#11436) KJ [ae6a324] [C-5786] Update user comments endpoint and add user CommentHistoryPage (#11427) KJ [1e7469f] [PAY-3953] Use db value for public key (#11391) Farid Salau [13f9ca0] [PAY-3858] Re-do challenge progress status label logic (#11429) Reed [f96aeec] Don't add computeLimit instruction to buyAudio flow swap (#11430) Marcus Pasell [5c595da] Custom component for web oneshot challenge (#11428) Reed [71768b4] [C-5674] Migrate notifications to tan-query (#11425) Dylan Jeffers [d881678] [C-5204] Fix android comment input clipping (#11386) Dylan Jeffers [99f5cd1] Fix batcher context resolver (#11426) Dylan Jeffers [67d4e5e] Refactor web challenge-rewards-modal (#11424) Dylan Jeffers [509c54e] Upgrade elliptic package to 6.6.1 (#11388) Dylan Jeffers [15a6c07] Misc fixes for mobile audio, usdc screens (#11422) Reed [17eef87] [C-5779] Update mobile profile layout (#11421) Randy Schott [bbf1bcf] Deprecate wallet.ts and formatUtils.ts functions in favor of FixedDecimal (#11423) Marcus Pasell [1896f71] [QA-1993] Fix suggested-artists UI overflow (#11420) Dylan Jeffers [2a9c257] Mobile reward notif navs to RewardsScreen, open drawer (#11419) Reed [9e75c9f] Fix reward panel ordering (#11418) Reed [be0c636] Remove one shot and listen streak feature flags (#11416) Reed [52201bf] Fix crash from `useGetTrackCommentNotificationSetting` returning undefined (#11395) Farid Salau [451a173] Fix android line height (#11413) Dylan Jeffers [eba6779] Minor profile page style fixes (#11412) Randy Schott [44b88d3] Update collectibles hook to return null instead of empty objects (#11410) Randy Schott [2b2124e] [QA-1979] Fix now playing UI in collection pages (#11408) Dylan Jeffers [fc3b294] Fix edit playlist nav link when unfetched (#11403) Andrew Mendelsohn [024323e] Fix create playlists for users with capcase handle (#11406) Dylan Jeffers [7ebd72b] Fix text clipping for rewards text (#11400) Dylan Jeffers [01e82df] [PAY-3949] Add fire emoji to notification (#11402) Farid Salau [5427e77] Fix drag n drop playlist reordering (#11401) Andrew Mendelsohn [19bb6ab] Add mobile notification for endless streak (#11398) Farid Salau [9ba62e3] [PAY-3848] Add ListenStreakReminder notification (#11389) Dylan Jeffers [f653e01] [C-5784] Use normalized batch entities in lineup queries (#11376) Andrew Mendelsohn [0f8fe4a] Fix top tracks (#11393) Farid Salau [e68da94] Fix "Complete Upload" crash (#11392) Farid Salau [7d310ef] [PAY-3850][PAY-3849] Add listen streak noti on web (#11379) Farid Salau
Description
This PR enhances challenge reward notifications to support listen streak challenges with dynamic messaging and UI updates.
Key Changes:
Data Model Updates
Added
listenStreak
field to notification types across the stack (SDK, store, API models) to track streak durationBackend Logic
handle_user_challenges
SQL function to:challenge_listen_streak
tableNotification Content
UI Improvements
Visual Changes:
"You've earned 1 $AUDIO for maintaining your listening streak! Keep your streak going to continue earning daily rewards!"
How Has This Been Tested?
npm run web:dev
packages/discovery-provider/src/challenges/listen_streak_endless_challenge.py
, changeNUM_DAYS_IN_STREAK
to 2 for easier testingor env == "dev"
case