Make exportDictionary and internalDictionary private vars instead of functions in FeedPasteboardWriter.
This commit is contained in:
parent
c4e97c028b
commit
3a5741a5dd
|
@ -172,9 +172,9 @@ extension Feed: PasteboardWriterOwner {
|
||||||
case .URL:
|
case .URL:
|
||||||
plist = feed.url
|
plist = feed.url
|
||||||
case FeedPasteboardWriter.feedUTIType:
|
case FeedPasteboardWriter.feedUTIType:
|
||||||
plist = exportDictionary()
|
plist = exportDictionary
|
||||||
case FeedPasteboardWriter.feedUTIInternalType:
|
case FeedPasteboardWriter.feedUTIInternalType:
|
||||||
plist = internalDictionary()
|
plist = internalDictionary
|
||||||
default:
|
default:
|
||||||
plist = nil
|
plist = nil
|
||||||
}
|
}
|
||||||
|
@ -185,13 +185,15 @@ extension Feed: PasteboardWriterOwner {
|
||||||
|
|
||||||
private extension FeedPasteboardWriter {
|
private extension FeedPasteboardWriter {
|
||||||
|
|
||||||
func exportDictionary() -> [String: String] {
|
var pasteboardFeed: PasteboardFeed {
|
||||||
let pasteboardFeed = PasteboardFeed(url: feed.url, feedID: feed.feedID, homePageURL: feed.homePageURL, name: feed.name, editedName: feed.editedName, accountID: feed.account?.accountID)
|
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()
|
return pasteboardFeed.exportDictionary()
|
||||||
}
|
}
|
||||||
|
|
||||||
func internalDictionary() -> [String: Any] {
|
var internalDictionary: PasteboardFeedDictionary {
|
||||||
let pasteboardFeed = PasteboardFeed(url: feed.url, feedID: feed.feedID, homePageURL: feed.homePageURL, name: feed.name, editedName: feed.editedName, accountID: feed.account?.accountID)
|
|
||||||
return pasteboardFeed.internalDictionary()
|
return pasteboardFeed.internalDictionary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue