mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-07 16:11:13 +00:00
Add Microsoft Edge open-in option
This commit is contained in:
parent
a69bd5f9d8
commit
26d63cf258
@ -258,6 +258,8 @@
|
|||||||
<string>moovit</string>
|
<string>moovit</string>
|
||||||
<string>alook</string>
|
<string>alook</string>
|
||||||
<string>dgis</string>
|
<string>dgis</string>
|
||||||
|
<string>microsoft-edge-http</string>
|
||||||
|
<string>microsoft-edge-https</string>
|
||||||
</array>
|
</array>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
@ -117,6 +117,16 @@ private func allOpenInOptions(context: AccountContext, item: OpenInItem) -> [Ope
|
|||||||
return .none
|
return .none
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
options.append(OpenInOption(identifier: "edge", application: .other(title: "Microsoft Edge", identifier: 1288723196, scheme: "microsoft-edge-http", store: nil), action: {
|
||||||
|
if let url = URL(string: url), var components = URLComponents(url: url, resolvingAgainstBaseURL: true) {
|
||||||
|
components.scheme = components.scheme == "https" ? "microsoft-edge-https" : "microsoft-edge-http"
|
||||||
|
if let url = components.string {
|
||||||
|
return .openUrl(url: url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return .none
|
||||||
|
}))
|
||||||
|
|
||||||
options.append(OpenInOption(identifier: "duckDuckGo", application: .other(title: "DuckDuckGo", identifier: 663592361, scheme: "ddgQuickLink", store: nil), action: {
|
options.append(OpenInOption(identifier: "duckDuckGo", application: .other(title: "DuckDuckGo", identifier: 663592361, scheme: "ddgQuickLink", store: nil), action: {
|
||||||
return .openUrl(url: "ddgQuickLink://\(url)")
|
return .openUrl(url: "ddgQuickLink://\(url)")
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user