Change restore and save func names to be more consistent.

This commit is contained in:
Maurice Parker 2020-03-03 15:36:22 -08:00
parent 1a41d4f265
commit 94d04e3cc2
4 changed files with 12 additions and 10 deletions

View File

@ -427,12 +427,14 @@ extension MainWindowController: NSWindowDelegate {
func window(_ window: NSWindow, willEncodeRestorableState coder: NSCoder) {
saveSplitViewState(to: coder)
sidebarViewController?.encodeState(with: coder)
sidebarViewController?.saveState(to: coder)
timelineContainerViewController?.saveState(to: coder)
}
func window(_ window: NSWindow, didDecodeRestorableState coder: NSCoder) {
restoreSplitViewState(from: coder)
sidebarViewController?.decodeState(with: coder)
sidebarViewController?.restoreState(from: coder)
timelineContainerViewController?.restoreState(from: coder)
}
func windowWillClose(_ notification: Notification) {

View File

@ -93,11 +93,11 @@ protocol SidebarDelegate: class {
// MARK: State Restoration
func encodeState(with coder: NSCoder) {
func saveState(to coder: NSCoder) {
coder.encode(isReadFiltered, forKey: UserInfoKey.readFeedsFilterState)
}
func decodeState(with coder: NSCoder) {
func restoreState(from coder: NSCoder) {
isReadFiltered = coder.decodeBool(forKey: UserInfoKey.readFeedsFilterState)
rebuildTreeAndRestoreSelection()
}

View File

@ -95,12 +95,12 @@ final class TimelineContainerViewController: NSViewController {
// MARK: State Restoration
func encodeState(with coder: NSCoder) {
regularTimelineViewController.encodeState(with: coder)
func saveState(to coder: NSCoder) {
regularTimelineViewController.saveState(to: coder)
}
func decodeState(with coder: NSCoder) {
regularTimelineViewController.decodeState(with: coder)
func restoreState(from coder: NSCoder) {
regularTimelineViewController.restoreState(from: coder)
}
}

View File

@ -246,11 +246,11 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
// MARK: State Restoration
func encodeState(with coder: NSCoder) {
func saveState(to coder: NSCoder) {
}
func decodeState(with coder: NSCoder) {
func restoreState(from coder: NSCoder) {
}