wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.63k stars 1.1k forks source link

Followers Total shows incorrect count #23110

Open guarani opened 2 months ago

guarani commented 2 months ago

Expected behavior

The Total Follower card in Stats Insights sometimes shows a number that excludes "email followers". For example, if the site has 10K followers in total (8K WP.com followers and 2K email followers), the Total Followers card should show 10K but sometimes shows 8K.

Actual behavior

A lower count is shown.

Steps to reproduce the behavior

  1. Open Stats on a high-traffic site for best results
  2. Add the Total Followers card if it's not already shown
  3. Notice that sometimes its value is not correct and that is because it sometimes excludes email followers
  4. Try again until you see the error
  5. Notice that pull-to-refresh may fixe the error

The app should use the v2/sites/{site_id}/subscribers endpoint according to pejTkB-1l5-p2#comment-1315, which includes a total:

{
  "total": 3,
  "pages": 1,
  "page": 1,
  "per_page": 100,
...
}

Note: there's a known issue with this endpoint on high-traffic sites: pejTkB-1l5-p2#comment-1318

Tested on iPad simulator, iOS 17.2, Jetpack iOS trunk
dangermattic commented 2 months ago

Thanks for reporting! 👍