From 1d589921d6cd43b227e853cba93bebd4a16484b5 Mon Sep 17 00:00:00 2001 From: Daniel Bernal Date: Fri, 15 Sep 2023 17:58:05 +0200 Subject: [PATCH] Clean up login titles at insert and update + migration (#1984) Task: https://app.asana.com/0/414235014887631/1205416253818145/f BSK: PR: duckduckgo/BrowserServicesKit#500 Description: In order to have cleaner Login titles for imported logins, we are now pattern-matching to extract the host name from titles at insertion and update, to clean up some known formats. --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- DuckDuckGo/FaviconsHelper.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 7a774a3585..bf939435bd 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -8878,7 +8878,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 78.0.0; + version = 78.1.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 239189c84a..0c17f67fdb 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "2a3dc29c9f0a2d90465a75afe47083a78ecaafe8", - "version": "78.0.0" + "revision": "ffb111c6688d991ab6bda02f44b81f7d190e427e", + "version": "78.1.0" } }, { diff --git a/DuckDuckGo/FaviconsHelper.swift b/DuckDuckGo/FaviconsHelper.swift index 2d0fafe810..3244cb6f02 100644 --- a/DuckDuckGo/FaviconsHelper.swift +++ b/DuckDuckGo/FaviconsHelper.swift @@ -121,7 +121,7 @@ struct FaviconsHelper { label.textColor = UIColor.white label.textAlignment = .center - if let prefferedPrefix = preferredFakeFaviconLetters?.prefix(letterCount).capitalized { + if let prefferedPrefix = preferredFakeFaviconLetters?.droppingWwwPrefix().prefix(letterCount).capitalized { label.text = prefferedPrefix } else { label.text = String(tld.eTLDplus1(domain)?.prefix(letterCount) ?? "#").capitalized