Revert to old logic

This commit is contained in:
Flowinho 2020-03-13 14:21:38 +01:00
parent ee86b1a148
commit 130691db34

View File

@ -16,9 +16,21 @@ final class IconView: UIView {
imageView.image = iconImage?.image
if self.traitCollection.userInterfaceStyle == .dark {
self.isDisconcernable = !(self.iconImage?.isDark ?? true)
if self.iconImage?.isDark ?? false {
self.isDisconcernable = false
self.setNeedsLayout()
} else {
self.isDisconcernable = true
self.setNeedsLayout()
}
} else {
self.isDisconcernable = !(self.iconImage?.isBright ?? true)
if self.iconImage?.isBright ?? false {
self.isDisconcernable = false
self.setNeedsLayout()
} else {
self.isDisconcernable = true
self.setNeedsLayout()
}
}
self.setNeedsLayout()
}