Apply background if feed-icon is bright

This commit is contained in:
Flowinho 2020-03-13 11:54:31 +01:00
parent d282181269
commit ee86b1a148
1 changed files with 3 additions and 8 deletions

View File

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