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

Question: Comment search and archive.org only available with WebView #166

Closed jonas-w closed 4 months ago

jonas-w commented 4 months ago

While browsing through the Harmonic source code I found out that it is possible to search through comments. This confused me, as I use this app daily, and never knew about it. Then I saw that the button for this only appears when WebView is enabled, and I always had it disabled.

Now to my question, to me it seems like comment search and opening the submission link on archive.org should not require WebView or am I missing something? I'd love to use this feature, but I also don't want to use the Harmonic WebView (I just prefer Firefox custom tabs + uBlock Origin).

With WebView enabled: Screenshot_20240418-045632~2

Without WebView: Screenshot_20240418-045748~2

flofriday commented 4 months ago

That seems odd. However, it seems like it isn't just that easy as disabiling the integrated webview. Cause I can disable it and still get the option button.

Proof: Screenshot 2024-04-20 at 01 10 43

I guess we will have to dig into the code to understand it...

flofriday commented 4 months ago

I couldn't find anything in the code that would indicate that we are hiding the menu at any point, but of course I could be missing something. Could you maybe share all your settings.

And maybe also on which device you are running the app (cause I have a suspicion).

jonas-w commented 4 months ago

As mentioned in the other issue I use the Pixel 8 Pro, but it has that weird screen resolution, do you think this could be the problem?

https://github.com/SimonHalvdansson/Harmonic-HN/issues/143#issuecomment-1969240690

Here are my settings:

Screenshot_20240420-024430 Screenshot_20240420-024437 Screenshot_20240420-024445 Screenshot_20240420-024449

flofriday commented 4 months ago

I used all the same settings in the simulator with the same story and cannot recreate the bug.

One assumption (I have is that for some reason there is not enough space on your device and the more button is dropped, but I am not that familiar with Android and don't know if that would even happen).

Edit: But even when I force large display size in the simulator that does not happen. Maybe you really have a weird device or maybe I am overlooking something.

flofriday commented 4 months ago

Ok I finally tried out an older commit (f600fd4f) which should be closer to your version of 2.0.2 and I could reproduce the bug in the simulator.

This means the bug is already fixed on main and won't appear in the next version 🎉 😊

jonas-w commented 4 months ago

@flofriday awesome! Probably this commit?

https://github.com/SimonHalvdansson/Harmonic-HN/commit/35e2c87dac4862a9735426ab8919e70c7200a334

flofriday commented 4 months ago

Definitely 😂 Should have searched the commit messsages

SimonHalvdansson commented 4 months ago

Yes indeed, sorry there's quite a backlog of unreleased fixes. Will try to push 2.0.3 tonight

jonas-w commented 4 months ago

@SimonHalvdansson thanks! Is there a reason that the last 2 releases don't have a tag attached?

https://github.com/SimonHalvdansson/Harmonic-HN/tags

IIRC they can be added retroactively

SimonHalvdansson commented 4 months ago

@jonas-w Not really, I am not too passionate about the tags to be honest but I'll do it for 2.0.3. I usually do tags together with releases for no too good reason.

jonas-w commented 4 months ago

@SimonHalvdansson okay no worries, I just realized it after flo said they tested a commit near the 2.0.2 release, and I couldn't find it in the tagsd

flofriday commented 4 months ago

Right, for that it might be quite handy cause there are some commits that bump the version string but I wasn't sure if that are also the commits that acutally landed in the appstores.

But also that's quite rare and I did manage find a close enough workaround 😉