aome510 / hackernews-TUI

A Terminal UI to browse Hacker News
MIT License
560 stars 20 forks source link

Why the results aren't the same as in the web? #79

Closed ftpd closed 2 years ago

ftpd commented 2 years ago

03013cf918d23c53b2c6ad0240a366111f7d66e4

I've decided to give hackernews-TUI a chance today but right after running it I've seen it shows different stories than they are on the web. Why? Do I use it somehow wrong?

aome510 commented 2 years ago

For tabs other than front page, it can either show the stories sorted by date or by points because HN Algolia API is used for that. front page stories are fetched using HN official API. This is why ask stories showed in the app are different from the web.

This can be resolved by using a mix of both APIs for ask,show,etc stories.

aome510 commented 2 years ago

Hi @ftpd, I've updated the app in #80 to show shown_hn and ask_hn stories in the same order as in the web. Can you try to the latest build of main to confirm that it works?

ftpd commented 2 years ago

Sorry, I was on holidays.

I still see some differences.

aome510 commented 2 years ago

Sorry, I was on holidays.

No worries.

I still see some differences.

Do u have any pictures of such differences? Mine is similar

image
ftpd commented 2 years ago

This is how it looks for me: ask

And frontpage looks fine: main

aome510 commented 2 years ago

Looks like you're using the old build of hackernews_tui, as the ask-hn stories are still sorted by date. Can u try it with the latest build from main (the change hasn't been released into a new version):

git clone https://github.com/aome510/hackernews-TUI.git && cd hackernews-TUI
cargo run
ftpd commented 2 years ago

Oh, I've just assumed there is a new release ;-) I will build it, but no sooner than today's evening (CEST). I will let you know, sorry for the inconvenience.

ftpd commented 2 years ago

Aaaaaaaand I forgot.

Now I've build from today's master - it works fine. Thanks, I will wait for the new release.

aome510 commented 2 years ago

Aaaaaaaand I forgot.

Now I've build from today's master - it works fine. Thanks, I will wait for the new release.

Great. Thanks for the confirmation. I'll release a new version soon