samuelclay / NewsBlur

NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
http://www.newsblur.com
MIT License
6.91k stars 1k forks source link

Android: Call /reader/refresh_feeds instead of forcing /reader/feeds to update counts #1871

Open quad opened 4 months ago

quad commented 4 months ago

This patches a long outstanding bug in 50e88b2bafd8b183b364484b57d3ed455db7b27a.

samuelclay commented 1 week ago

@sictiru I agree with this ticket, we should do the right thing and call /reader/feeds?flat=true&refresh_counts=false and then immediately call /reader/refresh_feeds/ to get the right count. On iOS, we show a "Counting is difficult..." message. I kinda remember making this call to get Android shipped a tiny bit faster, but it means Android is slow to load. Let's get this fixed!

samuelclay commented 1 week ago

Oh, this PR isn't the way to do it. But we can keep this PR as the ticket for it for now. I'm not going to be merging this, since this is fixing it in the wrong spot, but it's helpful to have as a reference, so let's just use this as the Android ticket.

samuelclay commented 1 week ago

Ohh, looking more carefully at this PR (and not the commit that I mistakenly thought was this PR's code), I realize that it is doing the right thing already. Androd is the 6 letter version of Android that i use in extract_user_agent since it makes the log a bit cleaner (iPhone is 6 letters, so they take the same size).

https://github.com/samuelclay/NewsBlur/blob/a5229ce5cbc19f7d84d68ad92ae0a26993f35ada/utils/user_functions.py#L139