Fix lint issues.

This commit is contained in:
Brent Simmons
2025-01-22 22:18:09 -08:00
parent 40ada2ba5a
commit bbef99f2d3
92 changed files with 1651 additions and 1694 deletions

View File

@@ -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)