Make exportDictionary and internalDictionary private vars instead of functions in FeedPasteboardWriter.

This commit is contained in:
Brent Simmons 2019-02-05 21:00:10 -08:00
parent c4e97c028b
commit 3a5741a5dd
1 changed files with 8 additions and 6 deletions

View File

@ -172,9 +172,9 @@ extension Feed: PasteboardWriterOwner {
case .URL:
plist = feed.url
case FeedPasteboardWriter.feedUTIType:
plist = exportDictionary()
plist = exportDictionary
case FeedPasteboardWriter.feedUTIInternalType:
plist = internalDictionary()
plist = internalDictionary
default:
plist = nil
}
@ -185,13 +185,15 @@ extension Feed: PasteboardWriterOwner {
private extension FeedPasteboardWriter {
func exportDictionary() -> [String: String] {
let pasteboardFeed = PasteboardFeed(url: feed.url, feedID: feed.feedID, homePageURL: feed.homePageURL, name: feed.name, editedName: feed.editedName, accountID: feed.account?.accountID)
var pasteboardFeed: PasteboardFeed {
return PasteboardFeed(url: feed.url, feedID: feed.feedID, homePageURL: feed.homePageURL, name: feed.name, editedName: feed.editedName, accountID: feed.account?.accountID)
}
var exportDictionary: PasteboardFeedDictionary {
return pasteboardFeed.exportDictionary()
}
func internalDictionary() -> [String: Any] {
let pasteboardFeed = PasteboardFeed(url: feed.url, feedID: feed.feedID, homePageURL: feed.homePageURL, name: feed.name, editedName: feed.editedName, accountID: feed.account?.accountID)
var internalDictionary: PasteboardFeedDictionary {
return pasteboardFeed.internalDictionary()
}
}