Switch to using TimelineViewController for the Feed Directory.

This commit is contained in:
Brent Simmons 2018-01-26 21:56:16 -08:00
parent 717e60fcf6
commit 5e7357cd90
5 changed files with 40 additions and 104 deletions

View File

@ -7,6 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
8403E75B201C4A79007F7246 /* FeedListKeyboardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8403E75A201C4A79007F7246 /* FeedListKeyboardDelegate.swift */; };
8414AD251FCF5A1E00955102 /* TimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */; }; 8414AD251FCF5A1E00955102 /* TimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */; };
841ABA4E20145E7300980E11 /* NothingInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */; }; 841ABA4E20145E7300980E11 /* NothingInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */; };
841ABA5E20145E9200980E11 /* FolderInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */; }; 841ABA5E20145E9200980E11 /* FolderInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */; };
@ -125,7 +126,6 @@
84E95D241FB1087500552D99 /* ArticlePasteboardWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E95D231FB1087500552D99 /* ArticlePasteboardWriter.swift */; }; 84E95D241FB1087500552D99 /* ArticlePasteboardWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E95D231FB1087500552D99 /* ArticlePasteboardWriter.swift */; };
84EB381F1FBA8B9F000D2111 /* KeyboardShortcuts.html in Resources */ = {isa = PBXBuildFile; fileRef = 84EB38101FBA8B9F000D2111 /* KeyboardShortcuts.html */; }; 84EB381F1FBA8B9F000D2111 /* KeyboardShortcuts.html in Resources */ = {isa = PBXBuildFile; fileRef = 84EB38101FBA8B9F000D2111 /* KeyboardShortcuts.html */; };
84F204CE1FAACB660076E152 /* FeedListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F204CD1FAACB660076E152 /* FeedListViewController.swift */; }; 84F204CE1FAACB660076E152 /* FeedListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F204CD1FAACB660076E152 /* FeedListViewController.swift */; };
84F204DE1FAACB8B0076E152 /* FeedListTimelineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F204DD1FAACB8B0076E152 /* FeedListTimelineViewController.swift */; };
84F204E01FAACBB30076E152 /* ArticleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F204DF1FAACBB30076E152 /* ArticleArray.swift */; }; 84F204E01FAACBB30076E152 /* ArticleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F204DF1FAACBB30076E152 /* ArticleArray.swift */; };
84F2D5371FC22FCC00998D64 /* PseudoFeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F2D5351FC22FCB00998D64 /* PseudoFeed.swift */; }; 84F2D5371FC22FCC00998D64 /* PseudoFeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F2D5351FC22FCB00998D64 /* PseudoFeed.swift */; };
84F2D5381FC22FCC00998D64 /* TodayFeedDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F2D5361FC22FCB00998D64 /* TodayFeedDelegate.swift */; }; 84F2D5381FC22FCC00998D64 /* TodayFeedDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F2D5361FC22FCB00998D64 /* TodayFeedDelegate.swift */; };
@ -466,6 +466,7 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
8403E75A201C4A79007F7246 /* FeedListKeyboardDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListKeyboardDelegate.swift; sourceTree = "<group>"; };
8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineHeaderView.swift; sourceTree = "<group>"; }; 8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineHeaderView.swift; sourceTree = "<group>"; };
841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NothingInspectorViewController.swift; sourceTree = "<group>"; }; 841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NothingInspectorViewController.swift; sourceTree = "<group>"; };
841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderInspectorViewController.swift; sourceTree = "<group>"; }; 841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderInspectorViewController.swift; sourceTree = "<group>"; };
@ -582,7 +583,6 @@
84E95D231FB1087500552D99 /* ArticlePasteboardWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticlePasteboardWriter.swift; sourceTree = "<group>"; }; 84E95D231FB1087500552D99 /* ArticlePasteboardWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticlePasteboardWriter.swift; sourceTree = "<group>"; };
84EB38101FBA8B9F000D2111 /* KeyboardShortcuts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = KeyboardShortcuts.html; sourceTree = "<group>"; }; 84EB38101FBA8B9F000D2111 /* KeyboardShortcuts.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = KeyboardShortcuts.html; sourceTree = "<group>"; };
84F204CD1FAACB660076E152 /* FeedListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListViewController.swift; sourceTree = "<group>"; }; 84F204CD1FAACB660076E152 /* FeedListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListViewController.swift; sourceTree = "<group>"; };
84F204DD1FAACB8B0076E152 /* FeedListTimelineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListTimelineViewController.swift; sourceTree = "<group>"; };
84F204DF1FAACBB30076E152 /* ArticleArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleArray.swift; sourceTree = "<group>"; }; 84F204DF1FAACBB30076E152 /* ArticleArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleArray.swift; sourceTree = "<group>"; };
84F2D5351FC22FCB00998D64 /* PseudoFeed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PseudoFeed.swift; sourceTree = "<group>"; }; 84F2D5351FC22FCB00998D64 /* PseudoFeed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PseudoFeed.swift; sourceTree = "<group>"; };
84F2D5361FC22FCB00998D64 /* TodayFeedDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TodayFeedDelegate.swift; sourceTree = "<group>"; }; 84F2D5361FC22FCB00998D64 /* TodayFeedDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TodayFeedDelegate.swift; sourceTree = "<group>"; };
@ -884,7 +884,7 @@
849A978C1ED9EE4D007D329B /* FeedListWindowController.swift */, 849A978C1ED9EE4D007D329B /* FeedListWindowController.swift */,
84CC08051FF5D2E000C0C0ED /* FeedListSplitViewController.swift */, 84CC08051FF5D2E000C0C0ED /* FeedListSplitViewController.swift */,
84F204CD1FAACB660076E152 /* FeedListViewController.swift */, 84F204CD1FAACB660076E152 /* FeedListViewController.swift */,
84F204DD1FAACB8B0076E152 /* FeedListTimelineViewController.swift */, 8403E75A201C4A79007F7246 /* FeedListKeyboardDelegate.swift */,
84513F8F1FAA63950023A1A9 /* FeedListControlsView.swift */, 84513F8F1FAA63950023A1A9 /* FeedListControlsView.swift */,
84B99C661FAE35E600ECDEDB /* FeedListTreeControllerDelegate.swift */, 84B99C661FAE35E600ECDEDB /* FeedListTreeControllerDelegate.swift */,
84B99C681FAE36B800ECDEDB /* FeedListFolder.swift */, 84B99C681FAE36B800ECDEDB /* FeedListFolder.swift */,
@ -1605,6 +1605,7 @@
D5A2678C20130ECF00A8D3C0 /* Author+Scriptability.swift in Sources */, D5A2678C20130ECF00A8D3C0 /* Author+Scriptability.swift in Sources */,
84F2D5371FC22FCC00998D64 /* PseudoFeed.swift in Sources */, 84F2D5371FC22FCC00998D64 /* PseudoFeed.swift in Sources */,
D553738B20186C20006D8857 /* Article+Scriptability.swift in Sources */, D553738B20186C20006D8857 /* Article+Scriptability.swift in Sources */,
8403E75B201C4A79007F7246 /* FeedListKeyboardDelegate.swift in Sources */,
845EE7C11FC2488C00854A1F /* SmartFeed.swift in Sources */, 845EE7C11FC2488C00854A1F /* SmartFeed.swift in Sources */,
84702AA41FA27AC0006B8943 /* MarkReadOrUnreadCommand.swift in Sources */, 84702AA41FA27AC0006B8943 /* MarkReadOrUnreadCommand.swift in Sources */,
D5907D7F2004AC00005947E5 /* NSApplication+Scriptability.swift in Sources */, D5907D7F2004AC00005947E5 /* NSApplication+Scriptability.swift in Sources */,
@ -1658,7 +1659,6 @@
84D52E951FE588BB00D14F5B /* DetailStatusBarView.swift in Sources */, 84D52E951FE588BB00D14F5B /* DetailStatusBarView.swift in Sources */,
84B99C671FAE35E600ECDEDB /* FeedListTreeControllerDelegate.swift in Sources */, 84B99C671FAE35E600ECDEDB /* FeedListTreeControllerDelegate.swift in Sources */,
84B99C691FAE36B800ECDEDB /* FeedListFolder.swift in Sources */, 84B99C691FAE36B800ECDEDB /* FeedListFolder.swift in Sources */,
84F204DE1FAACB8B0076E152 /* FeedListTimelineViewController.swift in Sources */,
84411E711FE5FBFA004B527F /* SmallIconProvider.swift in Sources */, 84411E711FE5FBFA004B527F /* SmallIconProvider.swift in Sources */,
844B5B591FE9FE4F00C7C76A /* SidebarKeyboardDelegate.swift in Sources */, 844B5B591FE9FE4F00C7C76A /* SidebarKeyboardDelegate.swift in Sources */,
849A97A31ED9F180007D329B /* FolderTreeControllerDelegate.swift in Sources */, 849A97A31ED9F180007D329B /* FolderTreeControllerDelegate.swift in Sources */,

View File

@ -234,14 +234,6 @@
<key>url</key> <key>url</key>
<string>http://www.virginiaroberts.com/feed/</string> <string>http://www.virginiaroberts.com/feed/</string>
</dict> </dict>
<dict>
<key>name</key>
<string>Feral Scrutiny</string>
<key>homePageURL</key>
<string>http://feralscrutiny.co/</string>
<key>url</key>
<string>http://feralscrutiny.co/feed/</string>
</dict>
</array> </array>
<key>News</key> <key>News</key>
<array> <array>

View File

@ -250,10 +250,10 @@
</objects> </objects>
<point key="canvasLocation" x="-967" y="1488"/> <point key="canvasLocation" x="-967" y="1488"/>
</scene> </scene>
<!--Feed List Timeline View Controller--> <!--Timeline View Controller-->
<scene sceneID="hOx-Zn-uli"> <scene sceneID="hOx-Zn-uli">
<objects> <objects>
<viewController id="5oM-Nv-I7I" customClass="FeedListTimelineViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController"> <viewController id="5oM-Nv-I7I" customClass="TimelineViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="Ayc-tI-OzD"> <view key="view" id="Ayc-tI-OzD">
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/> <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
@ -264,7 +264,7 @@
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/> <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" floatsGroupRows="NO" id="D1H-xQ-37M"> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" floatsGroupRows="NO" id="D1H-xQ-37M" customClass="TimelineTableView" customModule="Evergreen" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/> <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/> <size key="intercellSpacing" width="3" height="2"/>
@ -304,40 +304,12 @@
</tableCellView> </tableCellView>
</prototypeCellViews> </prototypeCellViews>
</tableColumn> </tableColumn>
<tableColumn identifier="" width="328" minWidth="40" maxWidth="1000" id="N5b-a8-DDG">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="UtV-Rc-YFH">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="e21-hS-OeE">
<rect key="frame" x="120" y="1" width="328" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MRY-sV-Us9">
<rect key="frame" x="0.0" y="0.0" width="328" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="EXc-CI-HAS">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<connections>
<outlet property="textField" destination="MRY-sV-Us9" id="6SL-WX-tp5"/>
</connections>
</tableCellView>
</prototypeCellViews>
</tableColumn>
</tableColumns> </tableColumns>
<connections>
<outlet property="dataSource" destination="5oM-Nv-I7I" id="ZmN-vl-ubI"/>
<outlet property="delegate" destination="5oM-Nv-I7I" id="lSh-Ow-oO3"/>
<outlet property="keyboardDelegate" destination="2ud-3a-p3A" id="nts-O0-WYq"/>
</connections>
</tableView> </tableView>
</subviews> </subviews>
</clipView> </clipView>
@ -358,8 +330,16 @@
<constraint firstItem="eGF-yH-oea" firstAttribute="leading" secondItem="Ayc-tI-OzD" secondAttribute="leading" id="xE0-7D-thL"/> <constraint firstItem="eGF-yH-oea" firstAttribute="leading" secondItem="Ayc-tI-OzD" secondAttribute="leading" id="xE0-7D-thL"/>
</constraints> </constraints>
</view> </view>
<connections>
<outlet property="tableView" destination="D1H-xQ-37M" id="6DC-Fc-yeT"/>
</connections>
</viewController> </viewController>
<customObject id="Xw8-6t-9F9" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/> <customObject id="Xw8-6t-9F9" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
<customObject id="2ud-3a-p3A" customClass="FeedListTimelineKeyboardDelegate" customModule="Evergreen" customModuleProvider="target">
<connections>
<outlet property="timelineViewController" destination="5oM-Nv-I7I" id="Xqu-94-MvJ"/>
</connections>
</customObject>
</objects> </objects>
<point key="canvasLocation" x="-261" y="1477"/> <point key="canvasLocation" x="-261" y="1477"/>
</scene> </scene>

View File

@ -0,0 +1,20 @@
//
// FeedListKeyboardDelegate.swift
// Evergreen
//
// Created by Brent Simmons on 1/26/18.
// Copyright © 2018 Ranchero Software. All rights reserved.
//
import AppKit
@objc final class FeedListTimelineKeyboardDelegate: NSObject, KeyboardDelegate {
@IBOutlet weak var timelineViewController: TimelineViewController?
func keydown(_ event: NSEvent, in view: NSView) -> Bool {
// TODO
return false
}
}

View File

@ -1,56 +0,0 @@
//
// FeedListTimelineViewController.swift
// Evergreen
//
// Created by Brent Simmons on 11/1/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Cocoa
final class FeedListTimelineViewController: NSViewController {
var selectedFeed: FeedListFeed? = nil {
didSet {
if let selectedFeed = selectedFeed {
selectedFeed.downloadIfNeeded()
}
}
}
override func viewDidLoad() {
view.translatesAutoresizingMaskIntoConstraints = false
NotificationCenter.default.addObserver(self, selector: #selector(sidebarSelectionDidChange(_:)), name: .FeedListSidebarSelectionDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(feedDidBecomeAvailable(_:)), name: .FeedListFeedDidBecomeAvailable, object: nil)
}
@objc func feedDidBecomeAvailable(_ note: Notification) {
guard let feed = note.object as? FeedListFeed else {
return
}
if feed == selectedFeed {
reloadTimeline()
}
}
@objc func sidebarSelectionDidChange(_ note: Notification) {
guard let feed = note.userInfo?[FeedListUserInfoKey.selectedObject] as? FeedListFeed else {
selectedFeed = nil
return
}
selectedFeed = feed
}
}
private extension FeedListTimelineViewController {
func reloadTimeline() {
//
}
}