pocket-casts-ios icon indicating copy to clipboard operation
pocket-casts-ios copied to clipboard

End of Year: check eligibility and listening history

Open leandroalonso opened this issue 2 years ago • 0 comments

📘 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:

  1. If their oldest item on Listening History is from a previous year
  2. 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

  1. Enable the endOfYear flag in FeatureFlag.swift
  2. Do a clean install of the app and run it
  3. ✅ Check that nothing happens, no modal is shown and there's no card under Profile
  4. Login to account in which you have a Listening History with a few episodes
  5. ✅ 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.

leandroalonso avatar Oct 21 '22 18:10 leandroalonso