Skip to content

Commit

Permalink
allow to open http-proxy-links in browser (#2410)
Browse files Browse the repository at this point in the history
* allow to open http-proxy-links in browser

http-proxies are identified by having a port number;
this is not the case for most http-pages.

however, if the guessing can be wrong,
always offer to open the browser alternatively

counterpart of deltachat/deltachat-android#3435
feature proposal at: https://support.delta.chat/t/in-the-new-android-client-it-is-not-possible-to-click-to-open-urls-with-port-numbers/3327

* update CHANGELOG
  • Loading branch information
r10s authored Nov 21, 2024
1 parent 9372141 commit 89466fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Delta Chat iOS Changelog

## Unreleased

- offer to open http-links detected as proxy also in the browser (#6237)


## v1.48.4

- fix: show forward-icon on iOS 15 and older
Expand Down
7 changes: 7 additions & 0 deletions deltachat-ios/Coordinator/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ class AppCoordinator: NSObject {

selectAlert.addAction(cancelAction)
selectAlert.addAction(selectAction)
if proxyURL.starts(with: "http") {
selectAlert.addAction(UIAlertAction(title: String.localized("open"), style: .default) { _ in
if let url = URL(string: proxyURL) {
UIApplication.shared.open(url)
}
})
}

viewController.present(selectAlert, animated: true)
}
Expand Down

0 comments on commit 89466fa

Please sign in to comment.