accumulator / Quickddit

Reddit client for Jolla's SailfishOS, Ubuntu Touch and Nokia N9
GNU General Public License v3.0
53 stars 21 forks source link

Highlight glitch in comment menu #60

Closed szopin closed 4 years ago

szopin commented 4 years ago

If you click an upvote/downvote on a comment sometimes the link icon gets highlighted, sometimes the parent-comment one, not really an issue/bug just a weird visual glitch. If you hold the press and move around it fixes itself and only the item under press is highlighted, weird

szopin commented 4 years ago

Looks like the first if condition in fancymenuitemrow in updateXPosFromMenu is responsible for that, or at least commenting it out seems to fix it (at least for the commentmenu, not sure if not used in other places)

accumulator commented 4 years ago

This special case was added to avoid glitches when tap-to-hide feature is enabled. When tap-to-hide is enabled, press-and-hold opens menu and this code allows to drag to the correct menu option without lifting your finger.

szopin commented 4 years ago

Weird, seems to be working fine here after disabling the first if condition (copy comment gets highlighted for a milisecond when moving from second row back to first, I guess that's it?)

accumulator commented 4 years ago

Yes, the leftmost item in a row gets highlighted for a short moment if the condition is removed from the code. I frankly never see the glitch you describe, maybe because I'm right handed?

szopin commented 4 years ago

Also right handed, yeah your thumb often covers it, if you have non-tap-to-hide setting then you can tap on any of the icons in the first row and either 1 or two icons to the right will highlight (you can tap and hold to see it clearly), so upvote will highlight parent-comment (if on a child comment) or link, downvote will end up highlighting link or favourite. I guess checking of tap-to-hide setting should get added to that if then

szopin commented 4 years ago

Ok, updated the PR adding check on appSettings.commentsTapToHide to the if and seems to work fine now, for both settings

accumulator commented 4 years ago

merged, thanks