Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to copy links instead opening #2445

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

add option to copy links instead opening #2445

wants to merge 10 commits into from

Conversation

r10s
Copy link
Member

@r10s r10s commented Dec 17, 2024

this PR adds detection if a link was long-tapped and offers the option "Copy Link" (instead of "Copy Text").

i was also playing around with offering both options and even with a totally separate menu, however, this seems both not better UX wise and is not worth additional effort. it is easy not to tap the link - and the other way round, if the links was accidentally tapped (eg. cause it is long), it is nice to have all options at hand (reactions :)

this method handles most kind of links: URLs, emails, phonenumber, commands - and adds few overhead, so that it is also easily mantainable in the future

this is how it looks like:

successor of #2155, #1729 and #1808
feature request at https://support.delta.chat/t/copy-a-link-from-a-message-on-long-press-in-ios/2755

@r10s r10s added the enhancement actually in development, user visible enhancement label Dec 18, 2024
deltachat-ios/Chat/ChatViewController.swift Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/Views/MessageLabel.swift Outdated Show resolved Hide resolved
}
}

internal func handleGesture(_ touchLocation: CGPoint) -> Bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the idea behind the boolean return value (that isn't used, from what I see)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement actually in development, user visible enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants