SimonHalvdansson / Harmonic-HN

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

Swiping back twice glitches #143

Open jonas-w opened 9 months ago

jonas-w commented 9 months ago

I don't know if this is a bug with your app or somewhere more deep in Android UI libraries.

But if I'm two (maybe it also happens at deeper lebels) levels deep and swipe back twice, the second swipe glitches:

https://github.com/SimonHalvdansson/Harmonic-HN/assets/32615971/ed06ef4f-59b3-42ee-8b5c-53d7846943a7

SimonHalvdansson commented 9 months ago

Hmm yeah I was able to reproduce it just now. A lot of this logic has been reworked quite recently so something there probably triggered this but I would say it is a bug within the SwipeBack library at the core.

Long term I would like to deprecate this setting as predictive back on Android 14 is the "recommended" way to handle this UI pattern (also predictive back does not have this bug). Until SwipeBack is removed though this issue will stay open and I'll try to look at it in the future.

flofriday commented 8 months ago

Did someting recently change, cause I cannot reproduce it in the simulator (Android 14) or on my device (Android 12).

jonas-w commented 8 months ago

Did someting recently change, cause I cannot reproduce it in the simulator (Android 14) or on my device (Android 12).

Can still reproduce it on my phone, and for me the animation glitches got worse and more.

jonas-w commented 8 months ago

https://github.com/SimonHalvdansson/Harmonic-HN/assets/32615971/783266bd-4b27-4229-b127-21cb47a0fafc

With two levels down there is the glitch I showed above, but with only one level down there is also some kind of glitchiness

flofriday commented 8 months ago

Super weird, on which android version are you?

SimonHalvdansson commented 8 months ago

This may be obvious but the "Disable swipe back from comments" setting has to be set to false for this to show up - I would think the bug should always be there otherwise.

jonas-w commented 8 months ago

Super weird, on which android version are you?

Android 14 GrapheneOS Pixel 8 Pro

flofriday commented 8 months ago

Ok I could finally reproduce it in the simulator. As far as I can tell I it only happens with android 14 and probably due to the new predictive back APIs (haven't looked into them too much). However, the glitches I get are way less visually disrupting than the ones in your recordings. However, that might be because it is the simulator.

jonas-w commented 8 months ago

@flofriday FWIW I already had another bug in another app that was related to the weird screen resolution that the google pixel 8 pro has (1344x2992), maybe this is another factor. I could only reproduce this, by using a custom emulator device with the screen resolution of the google pixel 8 pro, maybe this is the case for this bug too?

https://github.com/FossifyOrg/Calendar/pull/154

SimonHalvdansson commented 8 months ago

I can confirm that I never noticed this issue with my old OnePlus 9 Pro but it is there on my Pixel 8 Pro, nice observation.