From 8a4072df8a0b57028950605e976e643aafb91f37 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Nov 2024 12:08:15 +0100 Subject: [PATCH] simplify href handling further --- deltachat-ios/Controller/WebxdcViewController.swift | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/deltachat-ios/Controller/WebxdcViewController.swift b/deltachat-ios/Controller/WebxdcViewController.swift index 638fa1364..28de7dcef 100644 --- a/deltachat-ios/Controller/WebxdcViewController.swift +++ b/deltachat-ios/Controller/WebxdcViewController.swift @@ -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)