Rename ActivityFactory to ActivityManager because it will also handle activity deletes in the future
This commit is contained in:
parent
eb9c176f90
commit
dc6bf05ae4
|
@ -47,7 +47,7 @@
|
||||||
5183CCED22711DCE0010922C /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5183CCEC22711DCE0010922C /* Settings.storyboard */; };
|
5183CCED22711DCE0010922C /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5183CCEC22711DCE0010922C /* Settings.storyboard */; };
|
||||||
5183CCEF227125970010922C /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCEE227125970010922C /* SettingsViewController.swift */; };
|
5183CCEF227125970010922C /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCEE227125970010922C /* SettingsViewController.swift */; };
|
||||||
51934CCB230F599B006127BE /* ThemedNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51934CC1230F5963006127BE /* ThemedNavigationController.swift */; };
|
51934CCB230F599B006127BE /* ThemedNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51934CC1230F5963006127BE /* ThemedNavigationController.swift */; };
|
||||||
51934CCE2310792F006127BE /* ActivityFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51934CCD2310792F006127BE /* ActivityFactory.swift */; };
|
51934CCE2310792F006127BE /* ActivityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51934CCD2310792F006127BE /* ActivityManager.swift */; };
|
||||||
51934CD023108953006127BE /* ActivityID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51934CCF23108953006127BE /* ActivityID.swift */; };
|
51934CD023108953006127BE /* ActivityID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51934CCF23108953006127BE /* ActivityID.swift */; };
|
||||||
519B8D332143397200FA689C /* SharingServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519B8D322143397200FA689C /* SharingServiceDelegate.swift */; };
|
519B8D332143397200FA689C /* SharingServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519B8D322143397200FA689C /* SharingServiceDelegate.swift */; };
|
||||||
519E743D22C663F900A78E47 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519E743422C663F900A78E47 /* SceneDelegate.swift */; };
|
519E743D22C663F900A78E47 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519E743422C663F900A78E47 /* SceneDelegate.swift */; };
|
||||||
|
@ -704,7 +704,7 @@
|
||||||
5183CCEC22711DCE0010922C /* Settings.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = "<group>"; };
|
5183CCEC22711DCE0010922C /* Settings.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = "<group>"; };
|
||||||
5183CCEE227125970010922C /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
|
5183CCEE227125970010922C /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
|
||||||
51934CC1230F5963006127BE /* ThemedNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemedNavigationController.swift; sourceTree = "<group>"; };
|
51934CC1230F5963006127BE /* ThemedNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemedNavigationController.swift; sourceTree = "<group>"; };
|
||||||
51934CCD2310792F006127BE /* ActivityFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityFactory.swift; sourceTree = "<group>"; };
|
51934CCD2310792F006127BE /* ActivityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityManager.swift; sourceTree = "<group>"; };
|
||||||
51934CCF23108953006127BE /* ActivityID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityID.swift; sourceTree = "<group>"; };
|
51934CCF23108953006127BE /* ActivityID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityID.swift; sourceTree = "<group>"; };
|
||||||
5194B5ED22B6965300144881 /* SettingsSubscriptionsImportDocumentPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSubscriptionsImportDocumentPickerView.swift; sourceTree = "<group>"; };
|
5194B5ED22B6965300144881 /* SettingsSubscriptionsImportDocumentPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSubscriptionsImportDocumentPickerView.swift; sourceTree = "<group>"; };
|
||||||
5194B5F122B69FCC00144881 /* SettingsSubscriptionsExportDocumentPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSubscriptionsExportDocumentPickerView.swift; sourceTree = "<group>"; };
|
5194B5F122B69FCC00144881 /* SettingsSubscriptionsExportDocumentPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSubscriptionsExportDocumentPickerView.swift; sourceTree = "<group>"; };
|
||||||
|
@ -1093,7 +1093,7 @@
|
||||||
51934CCC231078DC006127BE /* Activity */ = {
|
51934CCC231078DC006127BE /* Activity */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
51934CCD2310792F006127BE /* ActivityFactory.swift */,
|
51934CCD2310792F006127BE /* ActivityManager.swift */,
|
||||||
51934CCF23108953006127BE /* ActivityID.swift */,
|
51934CCF23108953006127BE /* ActivityID.swift */,
|
||||||
51D87EE02311D34700E63F03 /* ActivityType.swift */,
|
51D87EE02311D34700E63F03 /* ActivityType.swift */,
|
||||||
);
|
);
|
||||||
|
@ -2452,7 +2452,7 @@
|
||||||
51C452762265091600C03939 /* MasterTimelineViewController.swift in Sources */,
|
51C452762265091600C03939 /* MasterTimelineViewController.swift in Sources */,
|
||||||
5183CCE9226F68D90010922C /* AccountRefreshTimer.swift in Sources */,
|
5183CCE9226F68D90010922C /* AccountRefreshTimer.swift in Sources */,
|
||||||
51C452882265093600C03939 /* AddFeedViewController.swift in Sources */,
|
51C452882265093600C03939 /* AddFeedViewController.swift in Sources */,
|
||||||
51934CCE2310792F006127BE /* ActivityFactory.swift in Sources */,
|
51934CCE2310792F006127BE /* ActivityManager.swift in Sources */,
|
||||||
DF999FF722B5AEFA0064B687 /* SafariView.swift in Sources */,
|
DF999FF722B5AEFA0064B687 /* SafariView.swift in Sources */,
|
||||||
51C4529B22650A1000C03939 /* FaviconDownloader.swift in Sources */,
|
51C4529B22650A1000C03939 /* FaviconDownloader.swift in Sources */,
|
||||||
84DEE56622C32CA4005FC42C /* SmartFeedDelegate.swift in Sources */,
|
84DEE56622C32CA4005FC42C /* SmartFeedDelegate.swift in Sources */,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// ActivityFactory.swift
|
// ActivityManager.swift
|
||||||
// NetNewsWire-iOS
|
// NetNewsWire-iOS
|
||||||
//
|
//
|
||||||
// Created by Maurice Parker on 8/23/19.
|
// Created by Maurice Parker on 8/23/19.
|
||||||
|
@ -11,9 +11,11 @@ import CoreSpotlight
|
||||||
import CoreServices
|
import CoreServices
|
||||||
import Articles
|
import Articles
|
||||||
|
|
||||||
class ActivityFactory {
|
class ActivityManager {
|
||||||
|
|
||||||
static func make(_ article: Article) -> NSUserActivity {
|
public static var shared = ActivityManager()
|
||||||
|
|
||||||
|
func makeReadArticleActivity(_ article: Article) -> NSUserActivity {
|
||||||
let activity = NSUserActivity(activityType: ActivityType.readArticle.rawValue)
|
let activity = NSUserActivity(activityType: ActivityType.readArticle.rawValue)
|
||||||
|
|
||||||
activity.title = article.title
|
activity.title = article.title
|
|
@ -1179,7 +1179,7 @@ private extension AppCoordinator {
|
||||||
|
|
||||||
guard let article = currentArticle else { return }
|
guard let article = currentArticle else { return }
|
||||||
|
|
||||||
readActivity = ActivityFactory.make(article)
|
readActivity = ActivityManager.shared.makeReadArticleActivity(article)
|
||||||
readActivity?.becomeCurrent()
|
readActivity?.becomeCurrent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue