From bacff92434aa21f076f589e15505b682409ad7a7 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 30 Sep 2019 02:54:19 -0500 Subject: [PATCH] Make timeline favicon have a background in darkmode when the favicon is too dark --- iOS/MasterTimeline/MasterTimelineViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index a74a96021..aac438b09 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -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 {