Some cleanup especially regarding method references (#516)
* Remove superfluous method arguments in method references * Use 'Self' for internal static access * Convert static to instance field in singleton class * Remove class name prefix in references to local methods * Remove nested frameworks in all extensions and frameworks
This commit is contained in:
parent
e1cbcb5d7a
commit
32b7c9b635
18 changed files with 57 additions and 57 deletions
|
|
@ -9,10 +9,10 @@
|
|||
public class PasscodeLock {
|
||||
public static let shared = PasscodeLock()
|
||||
|
||||
private static let identifier = Globals.bundleIdentifier + "passcode"
|
||||
private let identifier = Globals.bundleIdentifier + "passcode"
|
||||
|
||||
private var passcode: String? {
|
||||
AppKeychain.shared.get(for: PasscodeLock.identifier)
|
||||
AppKeychain.shared.get(for: identifier)
|
||||
}
|
||||
|
||||
/// Constructor used to migrate passcode from SharedDefaults to Keychain
|
||||
|
|
@ -28,7 +28,7 @@ public class PasscodeLock {
|
|||
}
|
||||
|
||||
public func save(passcode: String) {
|
||||
AppKeychain.shared.add(string: passcode, for: PasscodeLock.identifier)
|
||||
AppKeychain.shared.add(string: passcode, for: identifier)
|
||||
}
|
||||
|
||||
public func check(passcode: String) -> Bool {
|
||||
|
|
@ -36,6 +36,6 @@ public class PasscodeLock {
|
|||
}
|
||||
|
||||
public func delete() {
|
||||
AppKeychain.shared.removeContent(for: PasscodeLock.identifier)
|
||||
AppKeychain.shared.removeContent(for: identifier)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ public class PasswordStore {
|
|||
if Date().timeIntervalSince(lastCommitDate) <= 60 {
|
||||
return "JustNow".localize()
|
||||
}
|
||||
return PasswordStore.dateFormatter.string(from: lastCommitDate)
|
||||
return Self.dateFormatter.string(from: lastCommitDate)
|
||||
}
|
||||
|
||||
public func updateRemoteRepo() {}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class PasswordTableEntry: NSObject {
|
|||
}
|
||||
|
||||
public func matches(_ searchText: String) -> Bool {
|
||||
PasswordTableEntry.match(nameWithCategory: passwordEntity.nameWithCategory, searchText: searchText)
|
||||
Self.match(nameWithCategory: passwordEntity.nameWithCategory, searchText: searchText)
|
||||
}
|
||||
|
||||
public static func match(nameWithCategory: String, searchText: String) -> Bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue