From 4c148e6eba1709334cb1a6267bb31cd690196ae6 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 1 Jul 2020 16:37:20 -0500 Subject: [PATCH] Rename FeedImageLoader --- ...edImageLoader.swift => FeedIconImageLoader.swift} | 6 +++--- Multiplatform/Shared/Sidebar/SidebarItemView.swift | 6 +++--- NetNewsWire.xcodeproj/project.pbxproj | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) rename Multiplatform/Shared/Images/{FeedImageLoader.swift => FeedIconImageLoader.swift} (91%) diff --git a/Multiplatform/Shared/Images/FeedImageLoader.swift b/Multiplatform/Shared/Images/FeedIconImageLoader.swift similarity index 91% rename from Multiplatform/Shared/Images/FeedImageLoader.swift rename to Multiplatform/Shared/Images/FeedIconImageLoader.swift index 5dc6a40c7..4893af107 100644 --- a/Multiplatform/Shared/Images/FeedImageLoader.swift +++ b/Multiplatform/Shared/Images/FeedIconImageLoader.swift @@ -1,5 +1,5 @@ // -// FeedImageLoader.swift +// FeedIconImageLoader.swift // NetNewsWire // // Created by Maurice Parker on 6/29/20. @@ -9,7 +9,7 @@ import SwiftUI import Account -final class FeedImageLoader: ObservableObject { +final class FeedIconImageLoader: ObservableObject { private var feed: Feed? @@ -41,7 +41,7 @@ final class FeedImageLoader: ObservableObject { } -private extension FeedImageLoader { +private extension FeedIconImageLoader { @objc func faviconDidBecomeAvailable(_ note: Notification) { guard let feed = feed else { return } diff --git a/Multiplatform/Shared/Sidebar/SidebarItemView.swift b/Multiplatform/Shared/Sidebar/SidebarItemView.swift index a50b63414..b48d169fe 100644 --- a/Multiplatform/Shared/Sidebar/SidebarItemView.swift +++ b/Multiplatform/Shared/Sidebar/SidebarItemView.swift @@ -11,12 +11,12 @@ import Account struct SidebarItemView: View { - @StateObject var feedImageLoader = FeedImageLoader() + @StateObject var feedIconImageLoader = FeedIconImageLoader() var sidebarItem: SidebarItem var body: some View { HStack { - if let image = feedImageLoader.image { + if let image = feedIconImageLoader.image { IconImageView(iconImage: image) } Text(verbatim: sidebarItem.nameForDisplay) @@ -27,7 +27,7 @@ struct SidebarItemView: View { } .onAppear { if let feed = sidebarItem.feed { - feedImageLoader.loadImage(for: feed) + feedIconImageLoader.loadImage(for: feed) } }.contextMenu(menuItems: { menuItems diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 425d3cf58..9fba717ec 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -226,8 +226,8 @@ 51919FAD24AA8CCA00541E64 /* UnreadCountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FAB24AA8CCA00541E64 /* UnreadCountView.swift */; }; 51919FAF24AA8EFA00541E64 /* SidebarItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FAE24AA8EFA00541E64 /* SidebarItemView.swift */; }; 51919FB024AA8EFA00541E64 /* SidebarItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FAE24AA8EFA00541E64 /* SidebarItemView.swift */; }; - 51919FB324AAB97900541E64 /* FeedImageLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FB224AAB97900541E64 /* FeedImageLoader.swift */; }; - 51919FB424AAB97900541E64 /* FeedImageLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FB224AAB97900541E64 /* FeedImageLoader.swift */; }; + 51919FB324AAB97900541E64 /* FeedIconImageLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FB224AAB97900541E64 /* FeedIconImageLoader.swift */; }; + 51919FB424AAB97900541E64 /* FeedIconImageLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FB224AAB97900541E64 /* FeedIconImageLoader.swift */; }; 51919FB624AABCA100541E64 /* IconImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FB524AABCA100541E64 /* IconImageView.swift */; }; 51919FB724AABCA100541E64 /* IconImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FB524AABCA100541E64 /* IconImageView.swift */; }; 51919FEE24AB85E400541E64 /* TimelineContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51919FED24AB85E400541E64 /* TimelineContainerView.swift */; }; @@ -1838,7 +1838,7 @@ 51919FA524AA64B000541E64 /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = ""; }; 51919FAB24AA8CCA00541E64 /* UnreadCountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnreadCountView.swift; sourceTree = ""; }; 51919FAE24AA8EFA00541E64 /* SidebarItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarItemView.swift; sourceTree = ""; }; - 51919FB224AAB97900541E64 /* FeedImageLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedImageLoader.swift; sourceTree = ""; }; + 51919FB224AAB97900541E64 /* FeedIconImageLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedIconImageLoader.swift; sourceTree = ""; }; 51919FB524AABCA100541E64 /* IconImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconImageView.swift; sourceTree = ""; }; 51919FED24AB85E400541E64 /* TimelineContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineContainerView.swift; sourceTree = ""; }; 51919FF024AB864A00541E64 /* TimelineModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineModel.swift; sourceTree = ""; }; @@ -2639,7 +2639,7 @@ 51919FB124AAB95300541E64 /* Images */ = { isa = PBXGroup; children = ( - 51919FB224AAB97900541E64 /* FeedImageLoader.swift */, + 51919FB224AAB97900541E64 /* FeedIconImageLoader.swift */, 51919FB524AABCA100541E64 /* IconImageView.swift */, ); path = Images; @@ -4807,7 +4807,7 @@ 51E4997124A8764C00B667CB /* ActivityType.swift in Sources */, 51E4991E24A8094300B667CB /* RSImage-AppIcons.swift in Sources */, 51E499D824A912C200B667CB /* SceneModel.swift in Sources */, - 51919FB324AAB97900541E64 /* FeedImageLoader.swift in Sources */, + 51919FB324AAB97900541E64 /* FeedIconImageLoader.swift in Sources */, 51E4991324A808FB00B667CB /* AddWebFeedDefaultContainer.swift in Sources */, 51E4993C24A8709900B667CB /* AppDelegate.swift in Sources */, 51E498F924A8085D00B667CB /* SmartFeed.swift in Sources */, @@ -4878,7 +4878,7 @@ 51E498FC24A808BA00B667CB /* FaviconURLFinder.swift in Sources */, 51E4991C24A8092000B667CB /* NSAttributedString+NetNewsWire.swift in Sources */, 51E499D924A912C200B667CB /* SceneModel.swift in Sources */, - 51919FB424AAB97900541E64 /* FeedImageLoader.swift in Sources */, + 51919FB424AAB97900541E64 /* FeedIconImageLoader.swift in Sources */, 51E4994A24A8734C00B667CB /* ExtensionPointManager.swift in Sources */, 514E6C0324AD29A300AC6F6E /* TimelineItemStatusView.swift in Sources */, 51E4996D24A8762D00B667CB /* ArticleExtractor.swift in Sources */,