From 17a9ef520bb1f2566e463775b97394a6de817e4f Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Mon, 9 Oct 2023 11:21:38 +0100 Subject: [PATCH] fix show full address --- DuckDuckGo/OmniBar.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/OmniBar.swift b/DuckDuckGo/OmniBar.swift index e7cc7e92e8..05982e3f8d 100644 --- a/DuckDuckGo/OmniBar.swift +++ b/DuckDuckGo/OmniBar.swift @@ -359,12 +359,12 @@ class OmniBar: UIView { return } - if appSettings.showFullSiteAddress { - textField.text = url.absoluteString - } else if let query = url.searchQuery { + if let query = url.searchQuery, !appSettings.showFullSiteAddress { textField.text = query - } else { + } else if appSettings.showFullSiteAddress { textField.attributedText = OmniBar.demphasisePath(forUrl: url) + } else { + textField.text = url.host?.dropping(prefix: "www.") } }