Merge branch 'ios-release'

This commit is contained in:
Maurice Parker 2020-04-30 14:29:01 -05:00
commit 14e1dbe58e
11 changed files with 25 additions and 10 deletions

View File

@ -61,6 +61,12 @@ public struct Article: Hashable {
public func hash(into hasher: inout Hasher) {
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 {

View File

@ -209,10 +209,10 @@ final class ArticlesTable: DatabaseTable {
let newArticles = self.findAndSaveNewArticles(incomingArticles, fetchedArticlesDictionary, database) //5
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 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

View File

@ -60,7 +60,6 @@ class FeedWranglerAccountViewController: UITableViewController {
@IBAction func cancel(_ sender: Any) {
dismiss(animated: true, completion: nil)
delegate?.dismiss()
}
@IBAction func showHidePassword(_ sender: Any) {

View File

@ -61,7 +61,6 @@ class FeedbinAccountViewController: UITableViewController {
@IBAction func cancel(_ sender: Any) {
dismiss(animated: true, completion: nil)
delegate?.dismiss()
}
@IBAction func showHidePassword(_ sender: Any) {

View File

@ -25,7 +25,6 @@ class LocalAccountViewController: UITableViewController {
@IBAction func cancel(_ sender: Any) {
dismiss(animated: true, completion: nil)
delegate?.dismiss()
}
@IBAction func add(_ sender: Any) {

View File

@ -61,7 +61,6 @@ class NewsBlurAccountViewController: UITableViewController {
@IBAction func cancel(_ sender: Any) {
dismiss(animated: true, completion: nil)
delegate?.dismiss()
}
@IBAction func showHidePassword(_ sender: Any) {

View File

@ -21,6 +21,10 @@ class RootSplitViewController: UISplitViewController {
return .slide
}
override func viewDidAppear(_ animated: Bool) {
coordinator.resetFocus()
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
self.coordinator.configurePanelMode(for: size)
super.viewWillTransition(to: size, with: coordinator)

View File

@ -410,6 +410,14 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
wasRootSplitViewControllerCollapsed = rootSplitViewController.isCollapsed
}
func resetFocus() {
if currentArticle != nil {
masterTimelineViewController?.focus()
} else {
masterFeedViewController?.focus()
}
}
func selectFirstUnreadInAllUnread() {
markExpanded(SmartFeedsController.shared)
self.ensureFeedIsAvailableToSelect(SmartFeedsController.shared.unreadFeed) {

View File

@ -66,7 +66,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func sceneWillEnterForeground(_ scene: UIScene) {
appDelegate.resumeDatabaseProcessingIfNecessary()
appDelegate.prepareAccountsForForeground()
self.coordinator.configurePanelMode(for: window!.frame.size)
coordinator.configurePanelMode(for: window!.frame.size)
coordinator.resetFocus()
}
func stateRestorationActivity(for scene: UIScene) -> NSUserActivity? {

View File

@ -540,10 +540,10 @@
</objects>
<point key="canvasLocation" x="284" y="151"/>
</scene>
<!--Add Account View Controller-->
<!--Add Account-->
<scene sceneID="HbE-f2-Dbd">
<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">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

View File

@ -1,7 +1,7 @@
// High Level Settings common to both the iOS application and any extensions we bundle with it
MARKETING_VERSION = 5.0.1
CURRENT_PROJECT_VERSION = 41
CURRENT_PROJECT_VERSION = 43
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon