From 0c73dea478f0f2f00aff3cd138f0300bbb0b2dd5 Mon Sep 17 00:00:00 2001 From: Barijaona Ramaholimihaso Date: Sun, 3 Nov 2024 00:56:48 +0300 Subject: [PATCH] Fix tab titles Make them more informative during load, especially when tabs are loading in background: display the host name. --- Vienna/Sources/Main window/BrowserTab+Interface.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vienna/Sources/Main window/BrowserTab+Interface.swift b/Vienna/Sources/Main window/BrowserTab+Interface.swift index 71d2b41af0..374cf2789a 100644 --- a/Vienna/Sources/Main window/BrowserTab+Interface.swift +++ b/Vienna/Sources/Main window/BrowserTab+Interface.swift @@ -140,13 +140,13 @@ extension BrowserTab { } func updateTabTitle() { - if self.url != webView.url || self.url == nil { + if self.url != webView.url || webView.url == nil { // Currently loading (the first time), webview title not yet correct / available self.title = self.url?.host ?? NSLocalizedString("New Tab", comment: "") } else if let title = self.webView.title, !title.isEmpty { self.title = title - } else { - // Webview is about:blank or empty + } else if (self.title ?? "").isEmpty { + // we haven't yet set a title and Webview is about:blank or empty self.title = NSLocalizedString("New Tab", comment: "") } }