Simplify code
This commit is contained in:
parent
9e027b878a
commit
64956c6643
2 changed files with 7 additions and 9 deletions
|
|
@ -12,13 +12,10 @@ import SwiftyUserDefaults
|
|||
extension PasswordEntity {
|
||||
|
||||
public var nameWithCategory: String {
|
||||
get {
|
||||
if let p = path, p.hasSuffix(".gpg") {
|
||||
return String(p.prefix(upTo: p.index(p.endIndex, offsetBy: -4)))
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
if let p = path, p.hasSuffix(".gpg") {
|
||||
return String(p.prefix(upTo: p.index(p.endIndex, offsetBy: -4)))
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
public func getCategoryText() -> String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue