yourealwaysbe / forkyz

Forkyz Crosswords
GNU General Public License v3.0
39 stars 5 forks source link

Board seems glitchy/laggy at certain zoom levels #56

Closed jancborchardt closed 1 year ago

jancborchardt commented 1 year ago

The default zoom level works just fine, but often when I (mostly accidentally) zoom the board, moving the board seems laggy (as if low FPS), and tapping into a box sometimes does not seem to be exact.

This happens since some months and persists with the latest version from F-Droid. Let me know if I can help debug further somehow. :) So far the only fix is to reset the zoom manually, which is a bit tedious as it’s down in a submenu.

yourealwaysbe commented 1 year ago

I agree, there's something not quite right about the zooming. I also rarely use it, and use the double-tap to fit to screen option to reset the zoom, so i've kind of been happily forgetting about the problem for a while. This will give me an excuse to finally fix it.

jancborchardt commented 1 year ago

Both "fit to screen" and "100%" seem to work without issues, so maybe it could just be limited to those to first?

And thanks for the tip with double-tap!

jancborchardt commented 1 year ago

Hm – actually when you zoom (and it's glitchy when moving), you then go back to the crossword list, and then back into the same crossword, the same zoom level works fine.

yourealwaysbe commented 1 year ago

forkyz.apk.zip

I had a play and changed some potentially problematic bits with the pinch zoom implementation. However, i also realise i misread your bug report and thought it was the act of zooming that was glitchy, not moving around after zooming.

I've attached the current APK if it helps (you'll have to uninstall the current version since it's not signed by FDroid).

Nothing in the code jumps out at me as potentially causing scrolling lag, and it's not something i've noticed on my own device. That it works ok after exiting and reentering is odd, so maybe the zoom fixes i implemented might have caught whatever caused the problem. (E.g. it was repeatedly adding/removing the board image, which might have caused some abuse of resources which was cleared on restart.)

Let me know if you have any issues with the attached APK. If it's still broken, does the lag start only when zoomed in (more than fit to screen) or also when zoomed out (tiny board)? Does it happen after zooming once, or do you need to zoom in and out a few times? How inexact does board tapping become? Does it depend on position (e.g. top-left box is perfect, bottom-right is way off)?

yourealwaysbe commented 1 year ago

When you say "since some months", do you know roughly when? Even better if you know the last version number that didn't lag :)

yourealwaysbe commented 1 year ago

I've pushed Version 30, which should appear on FDroid soon. It has my attempted fix of this, so let me know if it helps.

jancborchardt commented 1 year ago

Sorry for the late reply! @yourealwaysbe I can confirm the issue is fixed and panning the board is much nicer at any zoom level. Thank you so much! :)

yourealwaysbe commented 1 year ago

Swing and a hit :) Thanks for the update. Let me know if the problem recurs.