mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix lint issues.
This commit is contained in:
@@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
final class IconView: UIView {
|
||||
|
||||
var iconImage: IconImage? = nil {
|
||||
var iconImage: IconImage? {
|
||||
didSet {
|
||||
guard iconImage !== oldValue else {
|
||||
return
|
||||
@@ -19,8 +19,7 @@ final class IconView: UIView {
|
||||
if traitCollection.userInterfaceStyle == .dark {
|
||||
let isDark = iconImage?.isDark ?? false
|
||||
isDiscernable = !isDark
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let isBright = iconImage?.isBright ?? false
|
||||
isDiscernable = !isBright
|
||||
}
|
||||
@@ -45,11 +44,11 @@ final class IconView: UIView {
|
||||
private var isSymbolImage: Bool {
|
||||
return iconImage?.isSymbol ?? false
|
||||
}
|
||||
|
||||
|
||||
private var isBackgroundSuppressed: Bool {
|
||||
return iconImage?.isBackgroundSuppressed ?? false
|
||||
}
|
||||
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
commonInit()
|
||||
@@ -59,7 +58,7 @@ final class IconView: UIView {
|
||||
super.init(coder: coder)
|
||||
commonInit()
|
||||
}
|
||||
|
||||
|
||||
convenience init() {
|
||||
self.init(frame: .zero)
|
||||
}
|
||||
@@ -96,8 +95,7 @@ private extension IconView {
|
||||
}
|
||||
let offset = floor((viewSize.height - imageSize.height) / 2.0)
|
||||
return CGRect(x: offset, y: offset, width: imageSize.width, height: imageSize.height)
|
||||
}
|
||||
else if imageSize.height > imageSize.width {
|
||||
} else if imageSize.height > imageSize.width {
|
||||
let factor = viewSize.height / imageSize.height
|
||||
let width = imageSize.width * factor
|
||||
let originX = floor((viewSize.width - width) / 2.0)
|
||||
|
||||
Reference in New Issue
Block a user