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
|
|
@ -80,16 +80,16 @@ class LabelTableViewCell: UITableViewCell {
|
|||
switch type {
|
||||
case .password:
|
||||
if isReveal {
|
||||
return action == #selector(copy(_:)) || action == #selector(concealPassword(_:))
|
||||
return action == #selector(copy(_:)) || action == #selector(concealPassword)
|
||||
}
|
||||
return action == #selector(copy(_:)) || action == #selector(revealPassword(_:))
|
||||
return action == #selector(copy(_:)) || action == #selector(revealPassword)
|
||||
case .URL:
|
||||
return action == #selector(copy(_:)) || action == #selector(openLink(_:))
|
||||
return action == #selector(copy(_:)) || action == #selector(openLink)
|
||||
case .HOTP:
|
||||
if isReveal {
|
||||
return action == #selector(copy(_:)) || action == #selector(concealPassword(_:)) || action == #selector(getNextHOTP(_:))
|
||||
return action == #selector(copy(_:)) || action == #selector(concealPassword) || action == #selector(getNextHOTP)
|
||||
}
|
||||
return action == #selector(copy(_:)) || action == #selector(revealPassword(_:)) || action == #selector(getNextHOTP(_:))
|
||||
return action == #selector(copy(_:)) || action == #selector(revealPassword) || action == #selector(getNextHOTP)
|
||||
default:
|
||||
return action == #selector(copy(_:))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ class UICodeHighlightingLabel: UILocalizedLabel {
|
|||
let formattedText = text.splitByNewline()
|
||||
.map { line -> NSAttributedString in
|
||||
if line.starts(with: " ") {
|
||||
return NSAttributedString(string: line, attributes: UICodeHighlightingLabel.CODE_ATTRIBUTES)
|
||||
return NSAttributedString(string: line, attributes: Self.CODE_ATTRIBUTES)
|
||||
}
|
||||
return NSAttributedString(string: line)
|
||||
}
|
||||
.reduce(into: NSMutableAttributedString(string: "")) {
|
||||
$0.append($1)
|
||||
$0.append(UICodeHighlightingLabel.ATTRIBUTED_NEWLINE)
|
||||
$0.append(Self.ATTRIBUTED_NEWLINE)
|
||||
}
|
||||
formattedText.deleteCharacters(in: NSRange(location: formattedText.length - 1, length: 1))
|
||||
return formattedText
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue