Change restore and save func names to be more consistent.
This commit is contained in:
parent
1a41d4f265
commit
94d04e3cc2
@ -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) {
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user