Skip to content

Commit

Permalink
Updates due to moving to Core
Browse files Browse the repository at this point in the history
  • Loading branch information
amddg44 committed Dec 10, 2024
1 parent 35aacad commit f35fa09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Core/AutofillInterfaceEmailTruncator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import Foundation

struct AutofillInterfaceEmailTruncator {
static func truncateEmail(_ email: String, maxLength: Int) -> String {
public struct AutofillInterfaceEmailTruncator {
public static func truncateEmail(_ email: String, maxLength: Int) -> String {
let emailComponents = email.components(separatedBy: "@")
if emailComponents.count > 1 && email.count > maxLength {
let ellipsis = "..."
Expand Down
10 changes: 7 additions & 3 deletions Core/PasswordHider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@

import Foundation

struct PasswordHider {
let password: String
var hiddenPassword: String {
public struct PasswordHider {
public let password: String
public var hiddenPassword: String {
let maximumPasswordDisplayCount = 22
let passwordCount = password.count > maximumPasswordDisplayCount ? maximumPasswordDisplayCount : password.count
return String(repeating: "", count: passwordCount)
}

public init(password: String) {
self.password = password
}
}

0 comments on commit f35fa09

Please sign in to comment.