Skip to content

Commit

Permalink
Clean up login titles at insert and update + migration (#1984)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
afterxleep authored Sep 15, 2023
1 parent f4a3db0 commit 1d58992
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8878,7 +8878,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 78.0.0;
version = 78.1.0;
};
};
C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/FaviconsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d58992

Please sign in to comment.