chinwag-android/app
Nik Clayton 10f983c953
Ignore clicks outside the start/end of a line (#3380)
* Ignore clicks outside the start/end of a line

`LinkMovementMethod` has a bug in its calculation of the clickable width of a span on a line. If the span is the last thing on the line the clickable area extends to the end of the view. So the user can tap what appears to be whitespace and open a link.

Previous code tried to fix this by adding a zero-width space after the link so that `LinkMovementMethod` wouldn't consider it empty. However the ZWS was selected by copy/paste operations, resulting in junk results if users tried to copy the link.

Fix this by subclassing `LinkMovementMethod` and fixing the click detection code to ignore clicks that are outside the bounds of the line that was clicked on.

Remove the code that adds the ZWS.

Fixes https://github.com/tuskyapp/Tusky/issues/1567

* Assume arguments are all non-null

* Use `object` for singleton

* getInstance as a one-liner
2023-02-27 08:54:51 +01:00
..
schemas/com.keylesspalace.tusky.db.AppDatabase Dialog notifying user of failure when media upload fails (#3135) 2023-01-27 20:50:45 +01:00
src Ignore clicks outside the start/end of a line (#3380) 2023-02-27 08:54:51 +01:00
build.gradle Gradle 8.0.1 (#3338) 2023-02-25 20:59:39 +01:00
getGitSha.gradle Previous attempt to fix git sha on non-git build broke git build. (#3322) 2023-02-16 20:20:52 +01:00
proguard-rules.pro Add extra proguard rules for OkHttp (#3350) 2023-02-25 21:40:13 +01:00