Skip to content

ViewMode: Add support for viewing link addresses#2798

Open
guanglinn wants to merge 3 commits intogsantner:masterfrom
guanglinn:copy_link
Open

ViewMode: Add support for viewing link addresses#2798
guanglinn wants to merge 3 commits intogsantner:masterfrom
guanglinn:copy_link

Conversation

@guanglinn
Copy link
Copy Markdown
Contributor

@guanglinn guanglinn commented Apr 14, 2026

Most people just want to view the link address behind the link text instead of directly copying it. This feature supports long pressing the link text to view the link address and copy it.

Related discussion: #1788

Screen recording

SVID_20260414_151529_1.mp4

// For copying link address to clipboard in view-mode
// For showing and copying link address in view-mode
_webView.setOnLongClickListener(v -> {
WebView.HitTestResult hitResult = _webView.getHitTestResult();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO if something can be made final then it should be final

Liberal use of final makes the code easier to read imo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think so too. Not only security, final can also improve program performance in most cases

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see final mostly as note to developer that the value won't change after first assignment (with little exception it being mandatory for passing certain variables to lambda etc).
As far I know and also searched a bit, adding final modifier not generally affects performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants