SimonHalvdansson / Harmonic-HN

Modern Android client for Hacker News
https://play.google.com/store/apps/details?id=com.simon.harmonichackernews
Apache License 2.0
611 stars 40 forks source link

Polls not showing when coming from Algolia (search/submissions) #158

Open jonas-w opened 6 months ago

jonas-w commented 6 months ago

Maybe I misremembered it, but I thought that polls were once implemented in Harmonic.

For example:

https://news.ycombinator.com/item?id=39572682

Shows as:

Screenshot_20240303-144159

And in the user view it looks even weirder with "null" posts: Screenshot_20240303-144244

Screenshot_20240303-144302

SimonHalvdansson commented 6 months ago

I think the problem here is that we're getting to the story (poll) from an interface which uses the Algolia interface. Algolia does not support polls so the way they're usually getting into the application is if we load a story using the normal API, e.g. from the home screen, the info from that API response is sent onwards to CommentsFragment which uses it to show the polls.

The way to solve this is to load/reload the HN API response when going into a story which is fetched from the Algolia API.