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

MimeMessageViewer handling weblinks #11

Open
large opened this issue Oct 15, 2021 · 1 comment
Open

MimeMessageViewer handling weblinks #11

large opened this issue Oct 15, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@large
Copy link

large commented Oct 15, 2021

Thank you for a great library!
Tested it and works very well.
There is an mailtoDelegate for the mailto:, but how do you handle weblinks hrefs http: and https:?
In my app I do previews of mails and I want to block all navigation. Is this a feature or possible?

@robert-virkus
Copy link
Member

This makes sense. You can now specify the urlLauncherDelegate:
Future<bool> Function(String url)? urlLauncherDelegate
Return true when the URL was handled,

This handler just swallows any URLs:

MimeMessageViewer(
  urlLauncherDelegate: (url) => Future.value(true),
),

I haven't released this yet, but you can depend on the git version to test this:

dependencies:
  enough_mail_flutter: 
    git:
      url: https://github.com/Enough-Software/enough_mail_flutter.git

If this works for you please close this issue.

@robert-virkus robert-virkus reopened this Oct 16, 2021
@robert-virkus robert-virkus self-assigned this Oct 16, 2021
@robert-virkus robert-virkus added the enhancement New feature or request label Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants