pocket-casts-ios
pocket-casts-ios copied to clipboard
End of Year: check eligibility and listening history
📘 Project: #376 |
---|
- Check if a user is eligible to see their EoY stats (aka they listened to at least one episode for more than 30 minutes this year)
- Check user Listening History, if their history is not complete, call a block to sync it
Checking Listening History
Right now, the app assumes that the user has the full listening history based on:
- If their oldest item on Listening History is from a previous year
- If the above is false check if their total number of episodes in Listening History is smaller or equal to 100 (the server limit)
Conversations about this is ongoing in pdeCcb-1mZ-p2#comment-1325
Note that we also still don't have the "listening history" sync endpoint, so there's no sync happening yet. However, everything is in place for doing so.
To test
- Enable the
endOfYear
flag inFeatureFlag.swift
- Do a clean install of the app and run it
- ✅ Check that nothing happens, no modal is shown and there's no card under Profile
- Login to account in which you have a Listening History with a few episodes
- ✅ Check that as soon as you logged in the modal is shown and the card is now visible on Profile
Checklist
- [x] I have considered if this change warrants user-facing release notes and have added them to
CHANGELOG.md
if necessary. - [x] I have considered adding unit tests for my changes.
- [x] I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.