From e6dee88e2e16d4f8fbe630ccd1a501b060554a78 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 13 Dec 2017 21:16:52 -0800 Subject: [PATCH] =?UTF-8?q?Update=20only=20the=20favicon=20in=20the=20side?= =?UTF-8?q?bar=20when=20a=20favicon=20is=20downloaded=20=E2=80=94=C2=A0no?= =?UTF-8?q?=20need=20to=20update=20the=20rest=20of=20the=20cell.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Evergreen/MainWindow/Sidebar/SidebarViewController.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Evergreen/MainWindow/Sidebar/SidebarViewController.swift b/Evergreen/MainWindow/Sidebar/SidebarViewController.swift index 2ec925aa9..c097ca9d4 100644 --- a/Evergreen/MainWindow/Sidebar/SidebarViewController.swift +++ b/Evergreen/MainWindow/Sidebar/SidebarViewController.swift @@ -86,7 +86,7 @@ import RSCore @objc func faviconDidBecomeAvailable(_ note: Notification) { - configureAvailableCells() + applyToAvailableCells(configureFavicon) } @objc func feedSettingDidChange(_ note: Notification) { @@ -342,7 +342,7 @@ private extension SidebarViewController { cell.objectValue = node cell.name = nameFor(node) configureUnreadCount(cell, node) - cell.image = imageFor(node) + configureFavicon(cell, node) cell.shouldShowImage = node.representedObject is Feed } @@ -351,6 +351,11 @@ private extension SidebarViewController { cell.unreadCount = unreadCountFor(node) } + func configureFavicon(_ cell: SidebarCell, _ node: Node) { + + cell.image = imageFor(node) + } + func configureGroupCell(_ cell: NSTableCellView, _ node: Node) { cell.objectValue = node