Merge branch 'ios-release'
This commit is contained in:
commit
14e1dbe58e
|
@ -61,6 +61,12 @@ public struct Article: Hashable {
|
||||||
public func hash(into hasher: inout Hasher) {
|
public func hash(into hasher: inout Hasher) {
|
||||||
hasher.combine(articleID)
|
hasher.combine(articleID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Equatable
|
||||||
|
|
||||||
|
static public func ==(lhs: Article, rhs: Article) -> Bool {
|
||||||
|
return lhs.articleID == rhs.articleID && lhs.accountID == rhs.accountID && lhs.webFeedID == rhs.webFeedID && lhs.uniqueID == rhs.uniqueID && lhs.title == rhs.title && lhs.contentHTML == rhs.contentHTML && lhs.contentText == rhs.contentText && lhs.url == rhs.url && lhs.externalURL == rhs.externalURL && lhs.summary == rhs.summary && lhs.imageURL == rhs.imageURL && lhs.datePublished == rhs.datePublished && lhs.dateModified == rhs.dateModified && lhs.authors == rhs.authors
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public extension Set where Element == Article {
|
public extension Set where Element == Article {
|
||||||
|
|
|
@ -209,10 +209,10 @@ final class ArticlesTable: DatabaseTable {
|
||||||
let newArticles = self.findAndSaveNewArticles(incomingArticles, fetchedArticlesDictionary, database) //5
|
let newArticles = self.findAndSaveNewArticles(incomingArticles, fetchedArticlesDictionary, database) //5
|
||||||
let updatedArticles = self.findAndSaveUpdatedArticles(incomingArticles, fetchedArticlesDictionary, database) //6
|
let updatedArticles = self.findAndSaveUpdatedArticles(incomingArticles, fetchedArticlesDictionary, database) //6
|
||||||
|
|
||||||
// Articles to delete are 1) no longer in feed and 2) older than 30 days.
|
// Articles to delete are 1) not starred and 2) older than 30 days and 3) no longer in feed.
|
||||||
let cutoffDate = Date().bySubtracting(days: 30)
|
let cutoffDate = Date().bySubtracting(days: 30)
|
||||||
let articlesToDelete = fetchedArticles.filter { (article) -> Bool in
|
let articlesToDelete = fetchedArticles.filter { (article) -> Bool in
|
||||||
return article.status.dateArrived < cutoffDate && !articleIDs.contains(article.articleID)
|
return !article.status.starred && article.status.dateArrived < cutoffDate && !articleIDs.contains(article.articleID)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.callUpdateArticlesCompletionBlock(newArticles, updatedArticles, articlesToDelete, completion) //7
|
self.callUpdateArticlesCompletionBlock(newArticles, updatedArticles, articlesToDelete, completion) //7
|
||||||
|
|
|
@ -60,7 +60,6 @@ class FeedWranglerAccountViewController: UITableViewController {
|
||||||
|
|
||||||
@IBAction func cancel(_ sender: Any) {
|
@IBAction func cancel(_ sender: Any) {
|
||||||
dismiss(animated: true, completion: nil)
|
dismiss(animated: true, completion: nil)
|
||||||
delegate?.dismiss()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func showHidePassword(_ sender: Any) {
|
@IBAction func showHidePassword(_ sender: Any) {
|
||||||
|
|
|
@ -61,7 +61,6 @@ class FeedbinAccountViewController: UITableViewController {
|
||||||
|
|
||||||
@IBAction func cancel(_ sender: Any) {
|
@IBAction func cancel(_ sender: Any) {
|
||||||
dismiss(animated: true, completion: nil)
|
dismiss(animated: true, completion: nil)
|
||||||
delegate?.dismiss()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func showHidePassword(_ sender: Any) {
|
@IBAction func showHidePassword(_ sender: Any) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ class LocalAccountViewController: UITableViewController {
|
||||||
|
|
||||||
@IBAction func cancel(_ sender: Any) {
|
@IBAction func cancel(_ sender: Any) {
|
||||||
dismiss(animated: true, completion: nil)
|
dismiss(animated: true, completion: nil)
|
||||||
delegate?.dismiss()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func add(_ sender: Any) {
|
@IBAction func add(_ sender: Any) {
|
||||||
|
|
|
@ -61,7 +61,6 @@ class NewsBlurAccountViewController: UITableViewController {
|
||||||
|
|
||||||
@IBAction func cancel(_ sender: Any) {
|
@IBAction func cancel(_ sender: Any) {
|
||||||
dismiss(animated: true, completion: nil)
|
dismiss(animated: true, completion: nil)
|
||||||
delegate?.dismiss()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func showHidePassword(_ sender: Any) {
|
@IBAction func showHidePassword(_ sender: Any) {
|
||||||
|
|
|
@ -21,6 +21,10 @@ class RootSplitViewController: UISplitViewController {
|
||||||
return .slide
|
return .slide
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
|
coordinator.resetFocus()
|
||||||
|
}
|
||||||
|
|
||||||
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
|
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
|
||||||
self.coordinator.configurePanelMode(for: size)
|
self.coordinator.configurePanelMode(for: size)
|
||||||
super.viewWillTransition(to: size, with: coordinator)
|
super.viewWillTransition(to: size, with: coordinator)
|
||||||
|
|
|
@ -410,6 +410,14 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||||
wasRootSplitViewControllerCollapsed = rootSplitViewController.isCollapsed
|
wasRootSplitViewControllerCollapsed = rootSplitViewController.isCollapsed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func resetFocus() {
|
||||||
|
if currentArticle != nil {
|
||||||
|
masterTimelineViewController?.focus()
|
||||||
|
} else {
|
||||||
|
masterFeedViewController?.focus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func selectFirstUnreadInAllUnread() {
|
func selectFirstUnreadInAllUnread() {
|
||||||
markExpanded(SmartFeedsController.shared)
|
markExpanded(SmartFeedsController.shared)
|
||||||
self.ensureFeedIsAvailableToSelect(SmartFeedsController.shared.unreadFeed) {
|
self.ensureFeedIsAvailableToSelect(SmartFeedsController.shared.unreadFeed) {
|
||||||
|
|
|
@ -66,7 +66,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
func sceneWillEnterForeground(_ scene: UIScene) {
|
func sceneWillEnterForeground(_ scene: UIScene) {
|
||||||
appDelegate.resumeDatabaseProcessingIfNecessary()
|
appDelegate.resumeDatabaseProcessingIfNecessary()
|
||||||
appDelegate.prepareAccountsForForeground()
|
appDelegate.prepareAccountsForForeground()
|
||||||
self.coordinator.configurePanelMode(for: window!.frame.size)
|
coordinator.configurePanelMode(for: window!.frame.size)
|
||||||
|
coordinator.resetFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
func stateRestorationActivity(for scene: UIScene) -> NSUserActivity? {
|
func stateRestorationActivity(for scene: UIScene) -> NSUserActivity? {
|
||||||
|
|
|
@ -540,10 +540,10 @@
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="284" y="151"/>
|
<point key="canvasLocation" x="284" y="151"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Add Account View Controller-->
|
<!--Add Account-->
|
||||||
<scene sceneID="HbE-f2-Dbd">
|
<scene sceneID="HbE-f2-Dbd">
|
||||||
<objects>
|
<objects>
|
||||||
<tableViewController storyboardIdentifier="AddAccountViewController" id="b00-4A-bV6" customClass="AddAccountViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
|
<tableViewController storyboardIdentifier="AddAccountViewController" title="Add Account" id="b00-4A-bV6" customClass="AddAccountViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="nw8-FO-Me5">
|
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="nw8-FO-Me5">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// High Level Settings common to both the iOS application and any extensions we bundle with it
|
// High Level Settings common to both the iOS application and any extensions we bundle with it
|
||||||
MARKETING_VERSION = 5.0.1
|
MARKETING_VERSION = 5.0.1
|
||||||
CURRENT_PROJECT_VERSION = 41
|
CURRENT_PROJECT_VERSION = 43
|
||||||
|
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
||||||
|
|
Loading…
Reference in New Issue