Skip to content

Commit

Permalink
simplify href handling further
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Nov 26, 2024
1 parent b0eb5de commit 8a4072d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions deltachat-ios/Controller/WebxdcViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,7 @@ class WebxdcViewController: WebViewViewController {
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
guard let self else { return }

let file = if let href {
href
} else {
"index.html"
}

let url = URL(string: "\(self.INTERNALSCHEMA)://acc\(self.dcContext.id)-msg\(self.messageId).localhost/" + file)
let url = URL(string: "\(self.INTERNALSCHEMA)://acc\(self.dcContext.id)-msg\(self.messageId).localhost/" + (href ?? "index.html"))
let urlRequest = URLRequest(url: url!)
DispatchQueue.main.async {
self.webView.load(urlRequest)
Expand Down

0 comments on commit 8a4072d

Please sign in to comment.