Make timeline favicon have a background in darkmode when the favicon is too dark

This commit is contained in:
Maurice Parker 2019-09-30 02:54:19 -05:00
parent 37418471bc
commit bacff92434

View File

@ -472,7 +472,12 @@ private extension MasterTimelineViewController {
if let titleView = Bundle.main.loadNibNamed("MasterTimelineTitleView", owner: self, options: nil)?[0] as? MasterTimelineTitleView {
self.titleView = titleView
titleView.imageView.image = coordinator.timelineFavicon
if traitCollection.userInterfaceStyle == .dark && titleView.imageView.image?.isDark() ?? false {
titleView.imageView.backgroundColor = AppAssets.avatarBackgroundColor
}
titleView.label.text = coordinator.timelineName
if coordinator.timelineFetcher is Feed {