mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 18:32:55 +00:00
Merge branch 'main' into bsc-662-catch-up
This commit is contained in:
113 files changed
+2473
-1485
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import PackageDescription
|
||||
|
||||
var dependencies: [Package.Dependency] = [
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.1.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSDatabase.git", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSParser.git", .upToNextMajor(from: "2.0.2")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSWeb.git", .upToNextMajor(from: "1.0.0")),
|
||||
|
||||
@@ -153,7 +153,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
||||
|
||||
public var sortedFolders: [Folder]? {
|
||||
if let folders = folders {
|
||||
return Array(folders).sorted(by: { $0.nameForDisplay.caseInsensitiveCompare($1.nameForDisplay) == .orderedAscending })
|
||||
return folders.sorted()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -517,10 +517,6 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
||||
addOPMLItems(OPMLNormalizer.normalize(items))
|
||||
}
|
||||
|
||||
public func markArticles(_ articles: Set<Article>, statusKey: ArticleStatus.Key, flag: Bool, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
delegate.markArticles(for: self, articles: articles, statusKey: statusKey, flag: flag, completion: completion)
|
||||
}
|
||||
|
||||
func existingContainer(withExternalID externalID: String) -> Container? {
|
||||
guard self.externalID != externalID else {
|
||||
return self
|
||||
@@ -639,6 +635,10 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
||||
delegate.restoreFolder(for: self, folder: folder, completion: completion)
|
||||
}
|
||||
|
||||
public func mark(articles: Set<Article>, statusKey: ArticleStatus.Key, flag: Bool, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
delegate.markArticles(for: self, articles: articles, statusKey: statusKey, flag: flag, completion: completion)
|
||||
}
|
||||
|
||||
func clearWebFeedMetadata(_ feed: WebFeed) {
|
||||
webFeedMetadata[feed.url] = nil
|
||||
}
|
||||
@@ -832,48 +832,46 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
||||
completion?(nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Mark articleIDs statuses based on statusKey and flag.
|
||||
/// Will create statuses in the database and in memory as needed. Sends a .StatusesDidChange notification.
|
||||
/// Returns a set of new article statuses.
|
||||
func markAndFetchNew(articleIDs: Set<String>, statusKey: ArticleStatus.Key, flag: Bool, completion: ArticleIDsCompletionBlock? = nil) {
|
||||
func mark(articleIDs: Set<String>, statusKey: ArticleStatus.Key, flag: Bool, completion: DatabaseCompletionBlock? = nil) {
|
||||
guard !articleIDs.isEmpty else {
|
||||
completion?(.success(Set<String>()))
|
||||
completion?(nil)
|
||||
return
|
||||
}
|
||||
database.markAndFetchNew(articleIDs: articleIDs, statusKey: statusKey, flag: flag) { result in
|
||||
switch result {
|
||||
case .success(let newArticleStatusIDs):
|
||||
database.mark(articleIDs: articleIDs, statusKey: statusKey, flag: flag) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
completion?(databaseError)
|
||||
} else {
|
||||
self.noteStatusesForArticleIDsDidChange(articleIDs: articleIDs, statusKey: statusKey, flag: flag)
|
||||
completion?(.success(newArticleStatusIDs))
|
||||
case .failure(let databaseError):
|
||||
completion?(.failure(databaseError))
|
||||
completion?(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark articleIDs as read. Will create statuses in the database and in memory as needed. Sends a .StatusesDidChange notification.
|
||||
/// Returns a set of new article statuses.
|
||||
func markAsRead(_ articleIDs: Set<String>, completion: ArticleIDsCompletionBlock? = nil) {
|
||||
markAndFetchNew(articleIDs: articleIDs, statusKey: .read, flag: true, completion: completion)
|
||||
func markAsRead(_ articleIDs: Set<String>, completion: DatabaseCompletionBlock? = nil) {
|
||||
mark(articleIDs: articleIDs, statusKey: .read, flag: true, completion: completion)
|
||||
}
|
||||
|
||||
/// Mark articleIDs as unread. Will create statuses in the database and in memory as needed. Sends a .StatusesDidChange notification.
|
||||
/// Returns a set of new article statuses.
|
||||
func markAsUnread(_ articleIDs: Set<String>, completion: ArticleIDsCompletionBlock? = nil) {
|
||||
markAndFetchNew(articleIDs: articleIDs, statusKey: .read, flag: false, completion: completion)
|
||||
func markAsUnread(_ articleIDs: Set<String>, completion: DatabaseCompletionBlock? = nil) {
|
||||
mark(articleIDs: articleIDs, statusKey: .read, flag: false, completion: completion)
|
||||
}
|
||||
|
||||
/// Mark articleIDs as starred. Will create statuses in the database and in memory as needed. Sends a .StatusesDidChange notification.
|
||||
/// Returns a set of new article statuses.
|
||||
func markAsStarred(_ articleIDs: Set<String>, completion: ArticleIDsCompletionBlock? = nil) {
|
||||
markAndFetchNew(articleIDs: articleIDs, statusKey: .starred, flag: true, completion: completion)
|
||||
func markAsStarred(_ articleIDs: Set<String>, completion: DatabaseCompletionBlock? = nil) {
|
||||
mark(articleIDs: articleIDs, statusKey: .starred, flag: true, completion: completion)
|
||||
}
|
||||
|
||||
/// Mark articleIDs as unstarred. Will create statuses in the database and in memory as needed. Sends a .StatusesDidChange notification.
|
||||
/// Returns a set of new article statuses.
|
||||
func markAsUnstarred(_ articleIDs: Set<String>, completion: ArticleIDsCompletionBlock? = nil) {
|
||||
markAndFetchNew(articleIDs: articleIDs, statusKey: .starred, flag: false, completion: completion)
|
||||
func markAsUnstarred(_ articleIDs: Set<String>, completion: DatabaseCompletionBlock? = nil) {
|
||||
mark(articleIDs: articleIDs, statusKey: .starred, flag: false, completion: completion)
|
||||
}
|
||||
|
||||
// Delete the articles associated with the given set of articleIDs
|
||||
|
||||
@@ -70,6 +70,9 @@ public final class AccountManager: UnreadCountProvider {
|
||||
if lastArticleFetchEndTime == nil || lastArticleFetchEndTime! < accountLastArticleFetchEndTime {
|
||||
lastArticleFetchEndTime = accountLastArticleFetchEndTime
|
||||
}
|
||||
} else {
|
||||
lastArticleFetchEndTime = nil
|
||||
break
|
||||
}
|
||||
}
|
||||
return lastArticleFetchEndTime
|
||||
|
||||
@@ -426,6 +426,7 @@ final class CloudKitAccountDelegate: AccountDelegate, Logging {
|
||||
|
||||
func accountDidInitialize(_ account: Account) {
|
||||
self.account = account
|
||||
refreshProgress.name = account.nameForDisplay
|
||||
|
||||
accountZone.delegate = CloudKitAcountZoneDelegate(account: account, refreshProgress: refreshProgress, articlesZone: articlesZone)
|
||||
articlesZone.delegate = CloudKitArticlesZoneDelegate(account: account, database: database, articlesZone: articlesZone)
|
||||
@@ -484,6 +485,7 @@ private extension CloudKitAccountDelegate {
|
||||
completion(.failure(error))
|
||||
}
|
||||
|
||||
refreshProgress.isIndeterminate = true
|
||||
refreshProgress.addToNumberOfTasksAndRemaining(3)
|
||||
accountZone.fetchChangesInZone() { result in
|
||||
self.refreshProgress.completeTask()
|
||||
@@ -495,6 +497,7 @@ private extension CloudKitAccountDelegate {
|
||||
case .success:
|
||||
self.refreshArticleStatus(for: account) { result in
|
||||
self.refreshProgress.completeTask()
|
||||
self.refreshProgress.isIndeterminate = false
|
||||
switch result {
|
||||
case .success:
|
||||
|
||||
@@ -522,6 +525,7 @@ private extension CloudKitAccountDelegate {
|
||||
func standardRefreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
|
||||
let intialWebFeedsCount = account.flattenedWebFeeds().count
|
||||
refreshProgress.isIndeterminate = true
|
||||
refreshProgress.addToNumberOfTasksAndRemaining(3 + intialWebFeedsCount)
|
||||
|
||||
func fail(_ error: Error) {
|
||||
@@ -542,6 +546,7 @@ private extension CloudKitAccountDelegate {
|
||||
switch result {
|
||||
case .success:
|
||||
self.refreshProgress.completeTask()
|
||||
self.refreshProgress.isIndeterminate = false
|
||||
self.combinedRefresh(account, webFeeds) { result in
|
||||
self.sendArticleStatus(for: account, showProgress: true) { _ in
|
||||
self.refreshProgress.clear()
|
||||
@@ -799,7 +804,7 @@ private extension CloudKitAccountDelegate {
|
||||
self.sendArticleStatus(for: account, showProgress: true) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
self.articlesZone.fetchChangesInZone() { _ in }
|
||||
self.refreshArticleStatus(for: account) { _ in }
|
||||
case .failure(let error):
|
||||
self.logger.error("CloudKit Feed send articles error: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ final class CloudKitAccountZone: CloudKitZone {
|
||||
|
||||
var zoneID: CKRecordZone.ID
|
||||
|
||||
var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
||||
|
||||
weak var container: CKContainer?
|
||||
weak var database: CKDatabase?
|
||||
var delegate: CloudKitZoneDelegate?
|
||||
|
||||
@@ -31,7 +31,7 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
|
||||
self.articlesZone = articlesZone
|
||||
}
|
||||
|
||||
func cloudKitDidModify(changed: [CKRecord], deleted: [CloudKitRecordKey], completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
func cloudKitWasChanged(updated: [CKRecord], deleted: [CloudKitRecordKey], completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
for deletedRecordKey in deleted {
|
||||
switch deletedRecordKey.recordType {
|
||||
case CloudKitAccountZone.CloudKitWebFeed.recordType:
|
||||
@@ -43,7 +43,7 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
for changedRecord in changed {
|
||||
for changedRecord in updated {
|
||||
switch changedRecord.recordType {
|
||||
case CloudKitAccountZone.CloudKitWebFeed.recordType:
|
||||
addOrUpdateWebFeed(changedRecord)
|
||||
|
||||
@@ -19,8 +19,6 @@ final class CloudKitArticlesZone: CloudKitZone {
|
||||
|
||||
var zoneID: CKRecordZone.ID
|
||||
|
||||
var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
||||
|
||||
weak var container: CKContainer?
|
||||
weak var database: CKDatabase?
|
||||
var delegate: CloudKitZoneDelegate? = nil
|
||||
@@ -64,28 +62,6 @@ final class CloudKitArticlesZone: CloudKitZone {
|
||||
migrateChangeToken()
|
||||
}
|
||||
|
||||
func refreshArticles(completion: @escaping ((Result<Void, Error>) -> Void)) {
|
||||
fetchChangesInZone() { result in
|
||||
switch result {
|
||||
case .success:
|
||||
completion(.success(()))
|
||||
case .failure(let error):
|
||||
if case CloudKitZoneError.userDeletedZone = error {
|
||||
self.createZoneRecord() { result in
|
||||
switch result {
|
||||
case .success:
|
||||
self.refreshArticles(completion: completion)
|
||||
case .failure(let error):
|
||||
completion(.failure(error))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
completion(.failure(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func saveNewArticles(_ articles: Set<Article>, completion: @escaping ((Result<Void, Error>) -> Void)) {
|
||||
guard !articles.isEmpty else {
|
||||
completion(.success(()))
|
||||
|
||||
@@ -28,7 +28,7 @@ class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate, Logging {
|
||||
self.articlesZone = articlesZone
|
||||
}
|
||||
|
||||
func cloudKitDidModify(changed: [CKRecord], deleted: [CloudKitRecordKey], completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
func cloudKitWasChanged(updated: [CKRecord], deleted: [CloudKitRecordKey], completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
|
||||
database.selectPendingReadStatusArticleIDs() { result in
|
||||
switch result {
|
||||
@@ -37,14 +37,16 @@ class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate, Logging {
|
||||
self.database.selectPendingStarredStatusArticleIDs() { result in
|
||||
switch result {
|
||||
case .success(let pendingStarredStatusArticleIDs):
|
||||
|
||||
self.delete(recordKeys: deleted, pendingStarredStatusArticleIDs: pendingStarredStatusArticleIDs) {
|
||||
self.update(records: changed,
|
||||
pendingReadStatusArticleIDs: pendingReadStatusArticleIDs,
|
||||
pendingStarredStatusArticleIDs: pendingStarredStatusArticleIDs,
|
||||
completion: completion)
|
||||
self.delete(recordKeys: deleted, pendingStarredStatusArticleIDs: pendingStarredStatusArticleIDs) { error in
|
||||
if let error = error {
|
||||
completion(.failure(error))
|
||||
} else {
|
||||
self.update(records: updated,
|
||||
pendingReadStatusArticleIDs: pendingReadStatusArticleIDs,
|
||||
pendingStarredStatusArticleIDs: pendingStarredStatusArticleIDs,
|
||||
completion: completion)
|
||||
}
|
||||
}
|
||||
|
||||
case .failure(let error):
|
||||
self.logger.error("Error occurred getting pending starred records: \(error.localizedDescription, privacy: .public)")
|
||||
completion(.failure(CloudKitZoneError.unknown))
|
||||
@@ -63,19 +65,27 @@ class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate, Logging {
|
||||
|
||||
private extension CloudKitArticlesZoneDelegate {
|
||||
|
||||
func delete(recordKeys: [CloudKitRecordKey], pendingStarredStatusArticleIDs: Set<String>, completion: @escaping () -> Void) {
|
||||
func delete(recordKeys: [CloudKitRecordKey], pendingStarredStatusArticleIDs: Set<String>, completion: @escaping (Error?) -> Void) {
|
||||
let receivedRecordIDs = recordKeys.filter({ $0.recordType == CloudKitArticlesZone.CloudKitArticleStatus.recordType }).map({ $0.recordID })
|
||||
let receivedArticleIDs = Set(receivedRecordIDs.map({ stripPrefix($0.externalID) }))
|
||||
let deletableArticleIDs = receivedArticleIDs.subtracting(pendingStarredStatusArticleIDs)
|
||||
|
||||
guard !deletableArticleIDs.isEmpty else {
|
||||
completion()
|
||||
completion(nil)
|
||||
return
|
||||
}
|
||||
|
||||
database.deleteSelectedForProcessing(Array(deletableArticleIDs)) { _ in
|
||||
self.account?.delete(articleIDs: deletableArticleIDs) { _ in
|
||||
completion()
|
||||
database.deleteSelectedForProcessing(Array(deletableArticleIDs)) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
completion(databaseError)
|
||||
} else {
|
||||
self.account?.delete(articleIDs: deletableArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
completion(databaseError)
|
||||
} else {
|
||||
completion(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,8 +106,8 @@ private extension CloudKitArticlesZoneDelegate {
|
||||
let group = DispatchGroup()
|
||||
|
||||
group.enter()
|
||||
account?.markAsUnread(updateableUnreadArticleIDs) { result in
|
||||
if case .failure(let databaseError) = result {
|
||||
account?.markAsUnread(updateableUnreadArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
errorOccurred = true
|
||||
self.logger.error("Error occurred while storing unread statuses: \(databaseError.localizedDescription, privacy: .public)")
|
||||
}
|
||||
@@ -105,8 +115,8 @@ private extension CloudKitArticlesZoneDelegate {
|
||||
}
|
||||
|
||||
group.enter()
|
||||
account?.markAsRead(updateableReadArticleIDs) { result in
|
||||
if case .failure(let databaseError) = result {
|
||||
account?.markAsRead(updateableReadArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
errorOccurred = true
|
||||
self.logger.error("Error occurred while storing read statuses: \(databaseError.localizedDescription, privacy: .public)")
|
||||
}
|
||||
@@ -114,8 +124,8 @@ private extension CloudKitArticlesZoneDelegate {
|
||||
}
|
||||
|
||||
group.enter()
|
||||
account?.markAsUnstarred(updateableUnstarredArticleIDs) { result in
|
||||
if case .failure(let databaseError) = result {
|
||||
account?.markAsUnstarred(updateableUnstarredArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
errorOccurred = true
|
||||
self.logger.error("Error occurred while storing unstarred statuses: \(databaseError.localizedDescription, privacy: .public)")
|
||||
}
|
||||
@@ -123,8 +133,8 @@ private extension CloudKitArticlesZoneDelegate {
|
||||
}
|
||||
|
||||
group.enter()
|
||||
account?.markAsStarred(updateableStarredArticleIDs) { result in
|
||||
if case .failure(let databaseError) = result {
|
||||
account?.markAsStarred(updateableStarredArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
errorOccurred = true
|
||||
self.logger.error("Error occurred while stroing starred records: \(databaseError.localizedDescription, privacy: .public)")
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class CloudKitReceiveStatusOperation: MainThreadOperation, Logging {
|
||||
|
||||
logger.debug("Refreshing article statuses...")
|
||||
|
||||
articlesZone.refreshArticles() { result in
|
||||
articlesZone.fetchChangesInZone() { result in
|
||||
self.logger.debug("Done refreshing article statuses.")
|
||||
switch result {
|
||||
case .success:
|
||||
|
||||
@@ -18,25 +18,63 @@ public struct CombinedRefreshProgress {
|
||||
public let numberRemaining: Int
|
||||
public let numberCompleted: Int
|
||||
public let isComplete: Bool
|
||||
public let isIndeterminate: Bool
|
||||
public let label: String
|
||||
|
||||
init(numberOfTasks: Int, numberRemaining: Int, numberCompleted: Int) {
|
||||
init(numberOfTasks: Int, numberRemaining: Int, numberCompleted: Int, isIndeterminate: Bool, label: String) {
|
||||
self.numberOfTasks = max(numberOfTasks, 0)
|
||||
self.numberRemaining = max(numberRemaining, 0)
|
||||
self.numberCompleted = max(numberCompleted, 0)
|
||||
self.isComplete = numberRemaining < 1
|
||||
self.isIndeterminate = isIndeterminate
|
||||
self.label = label
|
||||
}
|
||||
|
||||
public init(downloadProgressArray: [DownloadProgress]) {
|
||||
var numberOfDownloadsPossible = 0
|
||||
var numberOfDownloadsActive = 0
|
||||
var numberOfTasks = 0
|
||||
var numberRemaining = 0
|
||||
var numberCompleted = 0
|
||||
|
||||
var isIndeterminate = false
|
||||
var isInprecise = false
|
||||
|
||||
for downloadProgress in downloadProgressArray {
|
||||
numberOfDownloadsPossible += 1
|
||||
numberOfDownloadsActive += downloadProgress.isComplete ? 0 : 1
|
||||
numberOfTasks += downloadProgress.numberOfTasks
|
||||
numberRemaining += downloadProgress.numberRemaining
|
||||
numberCompleted += downloadProgress.numberCompleted
|
||||
|
||||
if downloadProgress.isIndeterminate {
|
||||
isIndeterminate = true
|
||||
}
|
||||
|
||||
if !downloadProgress.isPrecise {
|
||||
isInprecise = true
|
||||
}
|
||||
}
|
||||
|
||||
self.init(numberOfTasks: numberOfTasks, numberRemaining: numberRemaining, numberCompleted: numberCompleted)
|
||||
var label = ""
|
||||
|
||||
if numberOfDownloadsActive > 0 {
|
||||
if isInprecise {
|
||||
if numberOfDownloadsActive == 1 {
|
||||
if let activeName = downloadProgressArray.first(where: { $0.isComplete == false })?.name {
|
||||
let formatString = NSLocalizedString("Syncing %@", comment: "Status bar progress")
|
||||
label = NSString(format: formatString as NSString, activeName) as String
|
||||
}
|
||||
} else {
|
||||
let formatString = NSLocalizedString("Syncing %@ accounts", comment: "Status bar progress")
|
||||
label = NSString(format: formatString as NSString, NSNumber(value: numberOfDownloadsActive)) as String
|
||||
}
|
||||
} else {
|
||||
let formatString = NSLocalizedString("%@ of %@", comment: "Status bar progress")
|
||||
label = NSString(format: formatString as NSString, NSNumber(value: numberCompleted), NSNumber(value: numberOfTasks)) as String
|
||||
}
|
||||
}
|
||||
|
||||
self.init(numberOfTasks: numberOfTasks, numberRemaining: numberRemaining, numberCompleted: numberCompleted, isIndeterminate: isIndeterminate, label: label)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -576,6 +576,7 @@ final class FeedbinAccountDelegate: AccountDelegate, Logging {
|
||||
|
||||
func accountDidInitialize(_ account: Account) {
|
||||
credentials = try? account.retrieveCredentials(type: .basic)
|
||||
refreshProgress.name = account.nameForDisplay
|
||||
}
|
||||
|
||||
func accountWillBeDeleted(_ account: Account) {
|
||||
@@ -1406,27 +1407,29 @@ private extension FeedbinAccountDelegate {
|
||||
completion(.failure(FeedbinAccountDelegateError.invalidParameter))
|
||||
return
|
||||
}
|
||||
|
||||
func complete() {
|
||||
DispatchQueue.main.async {
|
||||
account.clearWebFeedMetadata(feed)
|
||||
account.removeWebFeed(feed)
|
||||
if let folders = account.folders {
|
||||
for folder in folders {
|
||||
folder.removeWebFeed(feed)
|
||||
}
|
||||
}
|
||||
completion(.success(()))
|
||||
}
|
||||
}
|
||||
|
||||
refreshProgress.addToNumberOfTasksAndRemaining(1)
|
||||
caller.deleteSubscription(subscriptionID: subscriptionID) { result in
|
||||
self.refreshProgress.completeTask()
|
||||
switch result {
|
||||
case .success:
|
||||
DispatchQueue.main.async {
|
||||
account.clearWebFeedMetadata(feed)
|
||||
account.removeWebFeed(feed)
|
||||
if let folders = account.folders {
|
||||
for folder in folders {
|
||||
folder.removeWebFeed(feed)
|
||||
}
|
||||
}
|
||||
completion(.success(()))
|
||||
}
|
||||
complete()
|
||||
case .failure(let error):
|
||||
DispatchQueue.main.async {
|
||||
let wrappedError = AccountError.wrappedError(error: error, account: account)
|
||||
completion(.failure(wrappedError))
|
||||
}
|
||||
self.logger.error("Unable to remove feed from Feedbin. Removing locally and continue processing: \(error.localizedDescription, privacy: .public)")
|
||||
complete()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RSCore
|
||||
import RSWeb
|
||||
import Secrets
|
||||
|
||||
@@ -820,33 +821,48 @@ extension FeedlyAPICaller: FeedlyMarkArticlesService {
|
||||
fatalError("\(components) does not produce a valid URL.")
|
||||
}
|
||||
|
||||
var request = URLRequest(url: url)
|
||||
request.httpMethod = "POST"
|
||||
request.addValue("application/json", forHTTPHeaderField: HTTPRequestHeader.contentType)
|
||||
request.addValue("application/json", forHTTPHeaderField: "Accept-Type")
|
||||
request.addValue("OAuth \(accessToken)", forHTTPHeaderField: HTTPRequestHeader.authorization)
|
||||
|
||||
do {
|
||||
let body = MarkerEntriesBody(action: action.actionValue, entryIds: Array(articleIds))
|
||||
let encoder = JSONEncoder()
|
||||
let data = try encoder.encode(body)
|
||||
request.httpBody = data
|
||||
} catch {
|
||||
return DispatchQueue.main.async {
|
||||
completion(.failure(error))
|
||||
let articleIdChunks = Array(articleIds).chunked(into: 300)
|
||||
let dispatchGroup = DispatchGroup()
|
||||
var groupError: Error? = nil
|
||||
|
||||
for articleIdChunk in articleIdChunks {
|
||||
|
||||
var request = URLRequest(url: url)
|
||||
request.httpMethod = "POST"
|
||||
request.addValue("application/json", forHTTPHeaderField: HTTPRequestHeader.contentType)
|
||||
request.addValue("application/json", forHTTPHeaderField: "Accept-Type")
|
||||
request.addValue("OAuth \(accessToken)", forHTTPHeaderField: HTTPRequestHeader.authorization)
|
||||
|
||||
do {
|
||||
let body = MarkerEntriesBody(action: action.actionValue, entryIds: Array(articleIdChunk))
|
||||
let encoder = JSONEncoder()
|
||||
let data = try encoder.encode(body)
|
||||
request.httpBody = data
|
||||
} catch {
|
||||
return DispatchQueue.main.async {
|
||||
completion(.failure(error))
|
||||
}
|
||||
}
|
||||
|
||||
dispatchGroup.enter()
|
||||
send(request: request, resultType: String.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in
|
||||
switch result {
|
||||
case .success(let (httpResponse, _)):
|
||||
if httpResponse.statusCode != 200 {
|
||||
groupError = URLError(.cannotDecodeContentData)
|
||||
}
|
||||
case .failure(let error):
|
||||
groupError = error
|
||||
}
|
||||
dispatchGroup.leave()
|
||||
}
|
||||
}
|
||||
|
||||
send(request: request, resultType: String.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in
|
||||
switch result {
|
||||
case .success(let (httpResponse, _)):
|
||||
if httpResponse.statusCode == 200 {
|
||||
completion(.success(()))
|
||||
} else {
|
||||
completion(.failure(URLError(.cannotDecodeContentData)))
|
||||
}
|
||||
case .failure(let error):
|
||||
completion(.failure(error))
|
||||
dispatchGroup.notify(queue: .main) {
|
||||
if let groupError = groupError {
|
||||
completion(.failure(groupError))
|
||||
} else {
|
||||
completion(.success(()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,6 +527,7 @@ final class FeedlyAccountDelegate: AccountDelegate, Logging {
|
||||
func accountDidInitialize(_ account: Account) {
|
||||
initializedAccount = account
|
||||
credentials = try? account.retrieveCredentials(type: .oauthAccessToken)
|
||||
refreshProgress.name = account.nameForDisplay
|
||||
}
|
||||
|
||||
func accountWillBeDeleted(_ account: Account) {
|
||||
|
||||
+6
-6
@@ -123,18 +123,18 @@ final class FeedlyIngestStarredArticleIdsOperation: FeedlyOperation, Logging {
|
||||
let results = StarredStatusResults()
|
||||
|
||||
group.enter()
|
||||
account.markAsStarred(remoteStarredArticleIDs) { result in
|
||||
if case .failure(let error) = result {
|
||||
results.markAsStarredError = error
|
||||
account.markAsStarred(remoteStarredArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
results.markAsStarredError = databaseError
|
||||
}
|
||||
group.leave()
|
||||
}
|
||||
|
||||
let deltaUnstarredArticleIDs = localStarredArticleIDs.subtracting(remoteStarredArticleIDs)
|
||||
group.enter()
|
||||
account.markAsUnstarred(deltaUnstarredArticleIDs) { result in
|
||||
if case .failure(let error) = result {
|
||||
results.markAsUnstarredError = error
|
||||
account.markAsUnstarred(deltaUnstarredArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
results.markAsUnstarredError = databaseError
|
||||
}
|
||||
group.leave()
|
||||
}
|
||||
|
||||
+6
-6
@@ -123,18 +123,18 @@ final class FeedlyIngestUnreadArticleIdsOperation: FeedlyOperation, Logging {
|
||||
let results = ReadStatusResults()
|
||||
|
||||
group.enter()
|
||||
account.markAsUnread(remoteUnreadArticleIDs) { result in
|
||||
if case .failure(let error) = result {
|
||||
results.markAsUnreadError = error
|
||||
account.markAsUnread(remoteUnreadArticleIDs) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
results.markAsUnreadError = databaseError
|
||||
}
|
||||
group.leave()
|
||||
}
|
||||
|
||||
let articleIDsToMarkRead = localUnreadArticleIDs.subtracting(remoteUnreadArticleIDs)
|
||||
group.enter()
|
||||
account.markAsRead(articleIDsToMarkRead) { result in
|
||||
if case .failure(let error) = result {
|
||||
results.markAsReadError = error
|
||||
account.markAsRead(articleIDsToMarkRead) { databaseError in
|
||||
if let databaseError = databaseError {
|
||||
results.markAsReadError = databaseError
|
||||
}
|
||||
group.leave()
|
||||
}
|
||||
|
||||
@@ -222,6 +222,8 @@ final class LocalAccountDelegate: AccountDelegate, Logging {
|
||||
|
||||
func accountDidInitialize(_ account: Account) {
|
||||
self.account = account
|
||||
refreshProgress.name = account.nameForDisplay
|
||||
refreshProgress.isPrecise = true
|
||||
}
|
||||
|
||||
func accountWillBeDeleted(_ account: Account) {
|
||||
|
||||
@@ -603,6 +603,7 @@ final class NewsBlurAccountDelegate: AccountDelegate, Logging {
|
||||
|
||||
func accountDidInitialize(_ account: Account) {
|
||||
credentials = try? account.retrieveCredentials(type: .newsBlurSessionId)
|
||||
refreshProgress.name = account.nameForDisplay
|
||||
}
|
||||
|
||||
func accountWillBeDeleted(_ account: Account) {
|
||||
|
||||
@@ -628,6 +628,7 @@ final class ReaderAPIAccountDelegate: AccountDelegate, Logging {
|
||||
|
||||
func accountDidInitialize(_ account: Account) {
|
||||
credentials = try? account.retrieveCredentials(type: .readerAPIKey)
|
||||
refreshProgress.name = account.nameForDisplay
|
||||
}
|
||||
|
||||
func accountWillBeDeleted(_ account: Account) {
|
||||
@@ -1058,7 +1059,7 @@ private extension ReaderAPIAccountDelegate {
|
||||
uniqueID: entry.uniqueID(variant: variant),
|
||||
feedURL: streamID,
|
||||
url: nil,
|
||||
externalURL: entry.alternates.first?.url,
|
||||
externalURL: entry.alternates?.first?.url,
|
||||
title: entry.title,
|
||||
language: nil,
|
||||
contentHTML: entry.summary.content,
|
||||
|
||||
@@ -58,7 +58,7 @@ struct ReaderAPIEntry: Codable {
|
||||
let timestampUsec: String?
|
||||
|
||||
let summary: ReaderAPIArticleSummary
|
||||
let alternates: [ReaderAPIAlternateLocation]
|
||||
let alternates: [ReaderAPIAlternateLocation]?
|
||||
let categories: [String]
|
||||
let origin: ReaderAPIEntryOrigin
|
||||
|
||||
|
||||
@@ -5,6 +5,39 @@
|
||||
<link>https://ranchero.com/downloads/netnewswire-beta.xml</link>
|
||||
<description>Most recent NetNewsWire changes with links to updates.</description>
|
||||
<language>en</language>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1.1b1</title>
|
||||
<description><![CDATA[
|
||||
<p>Fixed a bug that could prevent users from accessing BazQux if an article was missing a field</p>
|
||||
<p>Fixed an issue that could prevent Feedly users from syncing if they tried to mark too many articles as read at the same time</p>
|
||||
]]></description>
|
||||
<pubDate>Wed, 02 Nov 2022 21:20:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1.1b1/NetNewsWire6.1.1b1.zip" sparkle:version="6107" sparkle:shortVersionString="6.1.1b1" length="10969725" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1</title>
|
||||
<description><![CDATA[
|
||||
<p>Article themes. Several themes ship with the app, and you can create your own. You can change the theme in Preferences or by adding the theme switcher to the toolbar</p>
|
||||
<p>Copy URLs using repaired, rather than raw, feed links</p>
|
||||
<p>Restore article scroll position on relaunching app</p>
|
||||
<p>Added Copy Article URL and Copy External URL commands to the Edit menu</p>
|
||||
<p>Fixed a bug where using cmd-Q wouldn’t always quit the app as quickly as one might prefer</p>
|
||||
<p>Disallow creation of iCloud account in the app if iCloud and iCloud Drive aren’t both enabled</p>
|
||||
<p>Fixed bug showing quote tweets that only included an image</p>
|
||||
<p>Added a hidden pref to suppress downloading/syncing on start: `defaults write com.ranchero.NetNewsWire-Evergreen DevroeSuppressSyncOnLaunch -bool true`</p>
|
||||
<p>Video autoplay is now disallowed</p>
|
||||
<p>Article view now supports RTL layout</p>
|
||||
<p>Fixed a few font and sizing issues</p>
|
||||
<p>Updated built-in feeds</p>
|
||||
<p>Better alignment for items in General Preferences pane</p>
|
||||
]]></description>
|
||||
<pubDate>Thu, 07 Apr 2022 10:05:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1/NetNewsWire6.1.zip" sparkle:version="6106" sparkle:shortVersionString="6.1" length="10923258" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1b5</title>
|
||||
|
||||
@@ -6,6 +6,28 @@
|
||||
<description>Most recent NetNewsWire releases (not test builds).</description>
|
||||
<language>en</language>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1</title>
|
||||
<description><![CDATA[
|
||||
<p>Article themes. Several themes ship with the app, and you can create your own. You can change the theme in Preferences or by adding the theme switcher to the toolbar</p>
|
||||
<p>Copy URLs using repaired, rather than raw, feed links</p>
|
||||
<p>Restore article scroll position on relaunching app</p>
|
||||
<p>Added Copy Article URL and Copy External URL commands to the Edit menu</p>
|
||||
<p>Fixed a bug where using cmd-Q wouldn’t always quit the app as quickly as one might prefer</p>
|
||||
<p>Disallow creation of iCloud account in the app if iCloud and iCloud Drive aren’t both enabled</p>
|
||||
<p>Fixed bug showing quote tweets that only included an image</p>
|
||||
<p>Added a hidden pref to suppress downloading/syncing on start: `defaults write com.ranchero.NetNewsWire-Evergreen DevroeSuppressSyncOnLaunch -bool true`</p>
|
||||
<p>Video autoplay is now disallowed</p>
|
||||
<p>Article view now supports RTL layout</p>
|
||||
<p>Fixed a few font and sizing issues</p>
|
||||
<p>Updated built-in feeds</p>
|
||||
<p>Better alignment for items in General Preferences pane</p>
|
||||
]]></description>
|
||||
<pubDate>Thu, 07 Apr 2022 10:05:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1/NetNewsWire6.1.zip" sparkle:version="6106" sparkle:shortVersionString="6.1" length="10923258" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.3</title>
|
||||
<description><![CDATA[
|
||||
|
||||
@@ -11,7 +11,7 @@ let package = Package(
|
||||
targets: ["Articles"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.1.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import PackageDescription
|
||||
|
||||
var dependencies: [Package.Dependency] = [
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.1.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSDatabase.git", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSParser.git", .upToNextMajor(from: "2.0.2")),
|
||||
]
|
||||
|
||||
@@ -249,8 +249,8 @@ public final class ArticlesDatabase {
|
||||
return articlesTable.mark(articles, statusKey, flag, completion)
|
||||
}
|
||||
|
||||
public func markAndFetchNew(articleIDs: Set<String>, statusKey: ArticleStatus.Key, flag: Bool, completion: @escaping ArticleIDsCompletionBlock) {
|
||||
articlesTable.markAndFetchNew(articleIDs, statusKey, flag, completion)
|
||||
public func mark(articleIDs: Set<String>, statusKey: ArticleStatus.Key, flag: Bool, completion: DatabaseCompletionBlock?) {
|
||||
articlesTable.mark(articleIDs, statusKey, flag, completion)
|
||||
}
|
||||
|
||||
/// Create statuses for specified articleIDs. For existing statuses, don’t do anything.
|
||||
|
||||
@@ -221,7 +221,7 @@ final class ArticlesTable: DatabaseTable {
|
||||
func makeDatabaseCalls(_ database: FMDatabase) {
|
||||
let articleIDs = parsedItems.articleIDs()
|
||||
|
||||
let (statusesDictionary, _) = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, false, database) //1
|
||||
let statusesDictionary = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, false, database) //1
|
||||
assert(statusesDictionary.count == articleIDs.count)
|
||||
|
||||
let incomingArticles = Article.articlesWithParsedItems(parsedItems, webFeedID, self.accountID, statusesDictionary) //2
|
||||
@@ -303,7 +303,7 @@ final class ArticlesTable: DatabaseTable {
|
||||
articleIDs.formUnion(parsedItems.articleIDs())
|
||||
}
|
||||
|
||||
let (statusesDictionary, _) = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, read, database) //1
|
||||
let statusesDictionary = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, read, database) //1
|
||||
assert(statusesDictionary.count == articleIDs.count)
|
||||
|
||||
let allIncomingArticles = Article.articlesWithWebFeedIDsAndItems(webFeedIDsAndItems, self.accountID, statusesDictionary) //2
|
||||
@@ -476,17 +476,17 @@ final class ArticlesTable: DatabaseTable {
|
||||
}
|
||||
}
|
||||
|
||||
func markAndFetchNew(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ completion: @escaping ArticleIDsCompletionBlock) {
|
||||
func mark(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ completion: DatabaseCompletionBlock?) {
|
||||
queue.runInTransaction { databaseResult in
|
||||
switch databaseResult {
|
||||
case .success(let database):
|
||||
let newStatusIDs = self.statusesTable.markAndFetchNew(articleIDs, statusKey, flag, database)
|
||||
self.statusesTable.mark(articleIDs, statusKey, flag, database)
|
||||
DispatchQueue.main.async {
|
||||
completion(.success(newStatusIDs))
|
||||
completion?(nil)
|
||||
}
|
||||
case .failure(let databaseError):
|
||||
DispatchQueue.main.async {
|
||||
completion(.failure(databaseError))
|
||||
completion?(databaseError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ final class StatusesTable: DatabaseTable {
|
||||
|
||||
// MARK: - Creating/Updating
|
||||
|
||||
func ensureStatusesForArticleIDs(_ articleIDs: Set<String>, _ read: Bool, _ database: FMDatabase) -> ([String: ArticleStatus], Set<String>) {
|
||||
func ensureStatusesForArticleIDs(_ articleIDs: Set<String>, _ read: Bool, _ database: FMDatabase) -> [String: ArticleStatus] {
|
||||
|
||||
#if DEBUG
|
||||
// Check for missing statuses — this asserts that all the passed-in articleIDs exist in the statuses table.
|
||||
@@ -44,7 +44,7 @@ final class StatusesTable: DatabaseTable {
|
||||
// Check cache.
|
||||
let articleIDsMissingCachedStatus = articleIDsWithNoCachedStatus(articleIDs)
|
||||
if articleIDsMissingCachedStatus.isEmpty {
|
||||
return (statusesDictionary(articleIDs), Set<String>())
|
||||
return statusesDictionary(articleIDs)
|
||||
}
|
||||
|
||||
// Check database.
|
||||
@@ -56,7 +56,7 @@ final class StatusesTable: DatabaseTable {
|
||||
self.createAndSaveStatusesForArticleIDs(articleIDsNeedingStatus, read, database)
|
||||
}
|
||||
|
||||
return (statusesDictionary(articleIDs), articleIDsNeedingStatus)
|
||||
return statusesDictionary(articleIDs)
|
||||
}
|
||||
|
||||
// MARK: - Marking
|
||||
@@ -85,11 +85,10 @@ final class StatusesTable: DatabaseTable {
|
||||
return updatedStatuses
|
||||
}
|
||||
|
||||
func markAndFetchNew(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ database: FMDatabase) -> Set<String> {
|
||||
let (statusesDictionary, newStatusIDs) = ensureStatusesForArticleIDs(articleIDs, flag, database)
|
||||
func mark(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ database: FMDatabase) {
|
||||
let statusesDictionary = ensureStatusesForArticleIDs(articleIDs, flag, database)
|
||||
let statuses = Set(statusesDictionary.values)
|
||||
mark(statuses, statusKey, flag, database)
|
||||
return newStatusIDs
|
||||
}
|
||||
|
||||
// MARK: - Fetching
|
||||
|
||||
@@ -295,4 +295,10 @@ struct AppAssets {
|
||||
}
|
||||
}
|
||||
|
||||
static var notificationSoundBlipFileName: String = {
|
||||
// https://freesound.org/people/cabled_mess/sounds/350862/
|
||||
return "notificationSoundBlip.mp3"
|
||||
}()
|
||||
|
||||
|
||||
}
|
||||
@@ -42,6 +42,7 @@ final class AppDefaults {
|
||||
static let exportOPMLAccountID = "exportOPMLAccountID"
|
||||
static let defaultBrowserID = "defaultBrowserID"
|
||||
static let currentThemeName = "currentThemeName"
|
||||
static let hasSeenNotAllArticlesHaveURLsAlert = "hasSeenNotAllArticlesHaveURLsAlert"
|
||||
|
||||
// Hidden prefs
|
||||
static let showDebugMenu = "ShowDebugMenu"
|
||||
@@ -220,6 +221,15 @@ final class AppDefaults {
|
||||
AppDefaults.setString(for: Key.currentThemeName, newValue)
|
||||
}
|
||||
}
|
||||
|
||||
var hasSeenNotAllArticlesHaveURLsAlert: Bool {
|
||||
get {
|
||||
return UserDefaults.standard.bool(forKey: Key.hasSeenNotAllArticlesHaveURLsAlert)
|
||||
}
|
||||
set {
|
||||
UserDefaults.standard.set(newValue, forKey: Key.hasSeenNotAllArticlesHaveURLsAlert)
|
||||
}
|
||||
}
|
||||
|
||||
var showTitleOnMainWindow: Bool {
|
||||
return AppDefaults.bool(for: Key.showTitleOnMainWindow)
|
||||
|
||||
+194
-174
@@ -16,6 +16,7 @@ import RSCore
|
||||
import RSCoreResources
|
||||
import Secrets
|
||||
import CrashReporter
|
||||
import SwiftUI
|
||||
|
||||
// If we're not going to import Sparkle, provide dummy protocols to make it easy
|
||||
// for AppDelegate to comply
|
||||
@@ -31,7 +32,7 @@ var appDelegate: AppDelegate!
|
||||
@NSApplicationMain
|
||||
class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate, Logging
|
||||
{
|
||||
|
||||
|
||||
private struct WindowRestorationIdentifiers {
|
||||
static let mainWindow = "mainWindow"
|
||||
}
|
||||
@@ -43,7 +44,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
var webFeedIconDownloader: WebFeedIconDownloader!
|
||||
var extensionContainersFile: ExtensionContainersFile!
|
||||
var extensionFeedAddRequestFile: ExtensionFeedAddRequestFile!
|
||||
|
||||
|
||||
var appName: String!
|
||||
|
||||
var refreshTimer: AccountRefreshTimer?
|
||||
@@ -60,7 +61,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var isShutDownSyncDone = false
|
||||
|
||||
@IBOutlet var shareMenuItem: NSMenuItem!
|
||||
@@ -70,7 +71,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
@IBOutlet var sortByNewestArticleOnTopMenuItem: NSMenuItem!
|
||||
@IBOutlet var groupArticlesByFeedMenuItem: NSMenuItem!
|
||||
@IBOutlet var checkForUpdatesMenuItem: NSMenuItem!
|
||||
|
||||
|
||||
var unreadCount = 0 {
|
||||
didSet {
|
||||
if unreadCount != oldValue {
|
||||
@@ -79,7 +80,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private var mainWindowController: MainWindowController? {
|
||||
var bestController: MainWindowController?
|
||||
for candidateController in mainWindowControllers {
|
||||
@@ -104,43 +105,40 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
private var inspectorWindowController: InspectorWindowController?
|
||||
private var crashReportWindowController: CrashReportWindowController? // For testing only
|
||||
private let appMovementMonitor = RSAppMovementMonitor()
|
||||
#if !MAC_APP_STORE && !TEST
|
||||
#if !MAC_APP_STORE && !TEST
|
||||
private var softwareUpdater: SPUUpdater!
|
||||
private var crashReporter: PLCrashReporter!
|
||||
#endif
|
||||
#endif
|
||||
|
||||
private var themeImportPath: String?
|
||||
|
||||
override init() {
|
||||
NSWindow.allowsAutomaticWindowTabbing = false
|
||||
super.init()
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
let crashReporterConfig = PLCrashReporterConfig.defaultConfiguration()
|
||||
crashReporter = PLCrashReporter(configuration: crashReporterConfig)
|
||||
crashReporter.enable()
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
SecretsManager.provider = Secrets()
|
||||
AccountManager.shared = AccountManager(accountsFolder: Platform.dataSubfolder(forApplication: nil, folderName: "Accounts")!)
|
||||
ArticleThemesManager.shared = ArticleThemesManager(folderPath: Platform.dataSubfolder(forApplication: nil, folderName: "Themes")!)
|
||||
FeedProviderManager.shared.delegate = ExtensionPointManager.shared
|
||||
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(inspectableObjectsDidChange(_:)), name: .InspectableObjectsDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(importDownloadedTheme(_:)), name: .didEndDownloadingTheme, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(themeImportError(_:)), name: .didFailToImportThemeWithError, object: nil)
|
||||
NSWorkspace.shared.notificationCenter.addObserver(self, selector: #selector(didWakeNotification(_:)), name: NSWorkspace.didWakeNotification, object: nil)
|
||||
|
||||
|
||||
appDelegate = self
|
||||
}
|
||||
|
||||
|
||||
// MARK: - API
|
||||
func showAddFolderSheetOnWindow(_ window: NSWindow) {
|
||||
addFolderWindowController = AddFolderWindowController()
|
||||
addFolderWindowController!.runSheetOnWindow(window)
|
||||
}
|
||||
|
||||
|
||||
func showAddWebFeedSheetOnWindow(_ window: NSWindow, urlString: String?, name: String?, account: Account?, folder: Folder?) {
|
||||
addFeedController = AddFeedController(hostWindow: window)
|
||||
addFeedController?.showAddFeedSheet(.webFeed, urlString, name, account, folder)
|
||||
@@ -152,7 +150,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
installAppleEventHandlers()
|
||||
|
||||
CacheCleaner.purgeIfNecessary()
|
||||
|
||||
|
||||
// Try to establish a cache in the Caches folder, but if it fails for some reason fall back to a temporary dir
|
||||
let cacheFolder: String
|
||||
if let userCacheFolder = try? FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: false).path {
|
||||
@@ -162,40 +160,40 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
let bundleIdentifier = (Bundle.main.infoDictionary!["CFBundleIdentifier"]! as! String)
|
||||
cacheFolder = (NSTemporaryDirectory() as NSString).appendingPathComponent(bundleIdentifier)
|
||||
}
|
||||
|
||||
|
||||
let faviconsFolder = (cacheFolder as NSString).appendingPathComponent("Favicons")
|
||||
let faviconsFolderURL = URL(fileURLWithPath: faviconsFolder)
|
||||
try! FileManager.default.createDirectory(at: faviconsFolderURL, withIntermediateDirectories: true, attributes: nil)
|
||||
faviconDownloader = FaviconDownloader(folder: faviconsFolder)
|
||||
|
||||
|
||||
let imagesFolder = (cacheFolder as NSString).appendingPathComponent("Images")
|
||||
let imagesFolderURL = URL(fileURLWithPath: imagesFolder)
|
||||
try! FileManager.default.createDirectory(at: imagesFolderURL, withIntermediateDirectories: true, attributes: nil)
|
||||
imageDownloader = ImageDownloader(folder: imagesFolder)
|
||||
|
||||
|
||||
authorAvatarDownloader = AuthorAvatarDownloader(imageDownloader: imageDownloader)
|
||||
webFeedIconDownloader = WebFeedIconDownloader(imageDownloader: imageDownloader, folder: cacheFolder)
|
||||
|
||||
|
||||
appName = (Bundle.main.infoDictionary!["CFBundleExecutable"]! as! String)
|
||||
}
|
||||
|
||||
func applicationDidFinishLaunching(_ note: Notification) {
|
||||
|
||||
#if MAC_APP_STORE || TEST
|
||||
checkForUpdatesMenuItem.isHidden = true
|
||||
#else
|
||||
// Initialize Sparkle...
|
||||
let hostBundle = Bundle.main
|
||||
let updateDriver = SPUStandardUserDriver(hostBundle: hostBundle, delegate: self)
|
||||
self.softwareUpdater = SPUUpdater(hostBundle: hostBundle, applicationBundle: hostBundle, userDriver: updateDriver, delegate: self)
|
||||
|
||||
do {
|
||||
try self.softwareUpdater.start()
|
||||
}
|
||||
catch {
|
||||
logger.error("Failed to start software updater with error: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MAC_APP_STORE || TEST
|
||||
checkForUpdatesMenuItem.isHidden = true
|
||||
#else
|
||||
// Initialize Sparkle...
|
||||
let hostBundle = Bundle.main
|
||||
let updateDriver = SPUStandardUserDriver(hostBundle: hostBundle, delegate: self)
|
||||
self.softwareUpdater = SPUUpdater(hostBundle: hostBundle, applicationBundle: hostBundle, userDriver: updateDriver, delegate: self)
|
||||
|
||||
do {
|
||||
try self.softwareUpdater.start()
|
||||
}
|
||||
catch {
|
||||
logger.error("Failed to start software updater with error: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
#endif
|
||||
|
||||
AppDefaults.shared.registerDefaults()
|
||||
let isFirstRun = AppDefaults.shared.isFirstRun
|
||||
@@ -203,14 +201,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
logger.debug("Is first run")
|
||||
}
|
||||
let localAccount = AccountManager.shared.defaultAccount
|
||||
|
||||
|
||||
if isFirstRun && !AccountManager.shared.anyAccountHasAtLeastOneFeed() {
|
||||
// Import feeds. Either old NNW 3 feeds or the default feeds.
|
||||
if !NNW3ImportController.importSubscriptionsIfFileExists(account: localAccount) {
|
||||
DefaultFeedsImporter.importDefaultFeeds(account: localAccount)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
updateSortMenuItems()
|
||||
updateGroupByFeedMenuItem()
|
||||
|
||||
@@ -225,26 +223,26 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
if isFirstRun {
|
||||
mainWindowController?.window?.center()
|
||||
}
|
||||
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(webFeedSettingDidChange(_:)), name: .WebFeedSettingDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil)
|
||||
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.unreadCount = AccountManager.shared.unreadCount
|
||||
}
|
||||
|
||||
|
||||
if InspectorWindowController.shouldOpenAtStartup {
|
||||
self.toggleInspectorWindow(self)
|
||||
}
|
||||
|
||||
|
||||
extensionContainersFile = ExtensionContainersFile()
|
||||
extensionFeedAddRequestFile = ExtensionFeedAddRequestFile()
|
||||
|
||||
|
||||
refreshTimer = AccountRefreshTimer()
|
||||
syncTimer = ArticleStatusSyncTimer()
|
||||
|
||||
UNUserNotificationCenter.current().requestAuthorization(options:[.badge]) { (granted, error) in }
|
||||
|
||||
UNUserNotificationCenter.current().requestAuthorization(options:[.badge, .alert, .sound]) { (granted, error) in }
|
||||
|
||||
UNUserNotificationCenter.current().getNotificationSettings { (settings) in
|
||||
if settings.authorizationStatus == .authorized {
|
||||
DispatchQueue.main.async {
|
||||
@@ -252,14 +250,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UNUserNotificationCenter.current().delegate = self
|
||||
userNotificationManager = UserNotificationManager()
|
||||
|
||||
#if DEBUG
|
||||
|
||||
#if DEBUG
|
||||
refreshTimer!.update()
|
||||
syncTimer!.update()
|
||||
#else
|
||||
#else
|
||||
if AppDefaults.shared.suppressSyncOnLaunch {
|
||||
refreshTimer!.update()
|
||||
syncTimer!.update()
|
||||
@@ -269,26 +267,26 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
self.syncTimer!.timedRefresh(nil)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if AppDefaults.shared.showDebugMenu {
|
||||
// The Web Inspector uses SPI and can never appear in a MAC_APP_STORE build.
|
||||
#if MAC_APP_STORE
|
||||
let debugMenu = debugMenuItem.submenu!
|
||||
let toggleWebInspectorItemIndex = debugMenu.indexOfItem(withTarget: self, andAction: #selector(toggleWebInspectorEnabled(_:)))
|
||||
if toggleWebInspectorItemIndex != -1 {
|
||||
debugMenu.removeItem(at: toggleWebInspectorItemIndex)
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
// The Web Inspector uses SPI and can never appear in a MAC_APP_STORE build.
|
||||
#if MAC_APP_STORE
|
||||
let debugMenu = debugMenuItem.submenu!
|
||||
let toggleWebInspectorItemIndex = debugMenu.indexOfItem(withTarget: self, andAction: #selector(toggleWebInspectorEnabled(_:)))
|
||||
if toggleWebInspectorItemIndex != -1 {
|
||||
debugMenu.removeItem(at: toggleWebInspectorItemIndex)
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
debugMenuItem.menu?.removeItem(debugMenuItem)
|
||||
}
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
DispatchQueue.main.async {
|
||||
CrashReporter.check(crashReporter: self.crashReporter)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -299,7 +297,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
mainWindowController.handle(userActivity)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
|
||||
// https://github.com/brentsimmons/NetNewsWire/issues/522
|
||||
// I couldn’t reproduce the crashing bug, but it appears to happen on creating a main window
|
||||
@@ -313,7 +311,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
mainWindowController.showWindow(self)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
func applicationDidBecomeActive(_ notification: Notification) {
|
||||
fireOldTimers()
|
||||
}
|
||||
@@ -322,7 +320,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
ArticleStringFormatter.emptyCaches()
|
||||
saveState()
|
||||
}
|
||||
|
||||
|
||||
func application(_ application: NSApplication, didReceiveRemoteNotification userInfo: [String : Any]) {
|
||||
AccountManager.shared.receiveRemoteNotification(userInfo: userInfo)
|
||||
}
|
||||
@@ -346,14 +344,58 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
let timeout = Date().addingTimeInterval(2)
|
||||
while !isShutDownSyncDone && RunLoop.current.run(mode: .default, before: timeout) && timeout > Date() { }
|
||||
}
|
||||
|
||||
|
||||
func presentThemeImportError(_ error: Error) {
|
||||
var informativeText: String = ""
|
||||
|
||||
if let decodingError = error as? DecodingError {
|
||||
switch decodingError {
|
||||
case .typeMismatch(let type, _):
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because the the type—“%@”—is mismatched in the Info.plist", comment: "Type mismatch")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, type as! CVarArg) as String
|
||||
case .valueNotFound(let value, _):
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because the the value—“%@”—is not found in the Info.plist.", comment: "Decoding value missing")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, value as! CVarArg) as String
|
||||
case .keyNotFound(let codingKey, _):
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because the the key—“%@”—is not found in the Info.plist.", comment: "Decoding key missing")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, codingKey.stringValue) as String
|
||||
case .dataCorrupted(let context):
|
||||
guard let underlyingError = context.underlyingError as NSError?,
|
||||
let debugDescription = underlyingError.userInfo["NSDebugDescription"] as? String else {
|
||||
informativeText = error.localizedDescription
|
||||
break
|
||||
}
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because of data corruption in the Info.plist: %@.", comment: "Decoding key missing")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, debugDescription) as String
|
||||
|
||||
default:
|
||||
informativeText = error.localizedDescription
|
||||
}
|
||||
} else {
|
||||
informativeText = error.localizedDescription
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
let alert = NSAlert()
|
||||
alert.alertStyle = .warning
|
||||
alert.messageText = NSLocalizedString("Theme Error", comment: "Theme error")
|
||||
alert.informativeText = informativeText
|
||||
alert.addButton(withTitle: NSLocalizedString("OK", comment: "OK"))
|
||||
|
||||
alert.buttons[0].keyEquivalent = "\r"
|
||||
|
||||
let response = alert.runModal()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
@objc func unreadCountDidChange(_ note: Notification) {
|
||||
if note.object is AccountManager {
|
||||
unreadCount = AccountManager.shared.unreadCount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc func webFeedSettingDidChange(_ note: Notification) {
|
||||
guard let feed = note.object as? WebFeed, let key = note.userInfo?[WebFeed.WebFeedSettingUserInfoKey] as? String else {
|
||||
return
|
||||
@@ -362,14 +404,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
let _ = faviconDownloader.favicon(for: feed)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc func inspectableObjectsDidChange(_ note: Notification) {
|
||||
guard let inspectorWindowController = inspectorWindowController, inspectorWindowController.isOpen else {
|
||||
return
|
||||
}
|
||||
inspectorWindowController.objects = objectsForInspector()
|
||||
}
|
||||
|
||||
|
||||
@objc func userDefaultsDidChange(_ note: Notification) {
|
||||
updateSortMenuItems()
|
||||
updateGroupByFeedMenuItem()
|
||||
@@ -388,14 +430,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
|
||||
@objc func importDownloadedTheme(_ note: Notification) {
|
||||
guard let userInfo = note.userInfo,
|
||||
let url = userInfo["url"] as? URL else {
|
||||
let url = userInfo["url"] as? URL else {
|
||||
return
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
self.importTheme(filename: url.path)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: Main Window
|
||||
|
||||
func createMainWindowController() -> MainWindowController {
|
||||
@@ -408,12 +450,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
mainWindowControllers.append(controller)
|
||||
return controller
|
||||
}
|
||||
|
||||
|
||||
func windowControllerWithName(_ storyboardName: String) -> NSWindowController {
|
||||
let storyboard = NSStoryboard(name: NSStoryboard.Name(storyboardName), bundle: nil)
|
||||
return storyboard.instantiateInitialController()! as! NSWindowController
|
||||
}
|
||||
|
||||
|
||||
@discardableResult
|
||||
func createAndShowMainWindow() -> MainWindowController {
|
||||
let controller = createMainWindowController()
|
||||
@@ -426,7 +468,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
|
||||
return controller
|
||||
}
|
||||
|
||||
|
||||
func createAndShowMainWindowIfNecessary() {
|
||||
if mainWindowController == nil {
|
||||
createAndShowMainWindow()
|
||||
@@ -434,7 +476,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
mainWindowController?.showWindow(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func removeMainWindow(_ windowController: MainWindowController) {
|
||||
guard mainWindowControllers.count > 1 else { return }
|
||||
if let index = mainWindowControllers.firstIndex(of: windowController) {
|
||||
@@ -447,10 +489,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
if shuttingDown {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
let isDisplayingSheet = mainWindowController?.isDisplayingSheet ?? false
|
||||
let isSpecialAccountAvailable = AccountManager.shared.activeAccounts.contains(where: { $0.type == .onMyMac || $0.type == .cloudKit })
|
||||
|
||||
|
||||
if item.action == #selector(refreshAll(_:)) {
|
||||
return !AccountManager.shared.refreshInProgress && !AccountManager.shared.activeAccounts.isEmpty
|
||||
}
|
||||
@@ -484,7 +526,20 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
}
|
||||
return ExtensionPointManager.shared.isTwitterEnabled
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
if item.action == #selector(debugDropConditionalGetInfo(_:)) {
|
||||
return false
|
||||
}
|
||||
#endif
|
||||
|
||||
if item.action == #selector(debugTestCrashReporterWindow(_:)) ||
|
||||
item.action == #selector(debugTestCrashReportSending(_:)) ||
|
||||
item.action == #selector(forceCrash(_:)) {
|
||||
let appIDPrefix = Bundle.main.infoDictionary?["AppIdentifierPrefix"] as! String
|
||||
return appIDPrefix == "M8L2WTLA8W."
|
||||
}
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
if item.action == #selector(toggleWebInspectorEnabled(_:)) {
|
||||
(item as! NSMenuItem).state = AppDefaults.shared.webInspectorEnabled ? .on : .off
|
||||
@@ -719,6 +774,21 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
self.softwareUpdater.checkForUpdates()
|
||||
#endif
|
||||
}
|
||||
|
||||
@IBAction func showAbout(_ sender: Any?) {
|
||||
if #available(macOS 12, *) {
|
||||
for window in NSApplication.shared.windows {
|
||||
if window.identifier == .aboutNetNewsWire {
|
||||
window.makeKeyAndOrderFront(nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
let controller = AboutWindowController()
|
||||
controller.window?.makeKeyAndOrderFront(nil)
|
||||
} else {
|
||||
NSApplication.shared.orderFrontStandardAboutPanel(self)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -751,31 +821,53 @@ extension AppDelegate {
|
||||
|
||||
@IBAction func debugDropConditionalGetInfo(_ sender: Any?) {
|
||||
#if DEBUG
|
||||
AccountManager.shared.activeAccounts.forEach{ $0.debugDropConditionalGetInfo() }
|
||||
AccountManager.shared.activeAccounts.forEach{ $0.debugDropConditionalGetInfo() }
|
||||
#endif
|
||||
}
|
||||
|
||||
@IBAction func debugClearImageCaches(_ sender: Any?) {
|
||||
let alert = NSAlert()
|
||||
alert.alertStyle = .warning
|
||||
alert.messageText = NSLocalizedString("Are you sure you want to clear the image caches? This will restart NetNewsWire to begin reloading the remote images.",
|
||||
comment: "Clear and restart confirmation message.")
|
||||
alert.addButton(withTitle: NSLocalizedString("Clear & Restart", comment: "Clear & Restart"))
|
||||
alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel"))
|
||||
|
||||
let userChoice = alert.runModal()
|
||||
if userChoice == .alertFirstButtonReturn {
|
||||
CacheCleaner.purge()
|
||||
|
||||
let configuration = NSWorkspace.OpenConfiguration()
|
||||
configuration.createsNewApplicationInstance = true
|
||||
NSWorkspace.shared.openApplication(at: Bundle.main.bundleURL, configuration: configuration)
|
||||
|
||||
NSApp.terminate(self)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func debugTestCrashReporterWindow(_ sender: Any?) {
|
||||
#if DEBUG
|
||||
crashReportWindowController = CrashReportWindowController(crashLogText: "This is a test crash log.")
|
||||
crashReportWindowController!.testing = true
|
||||
crashReportWindowController!.showWindow(self)
|
||||
crashReportWindowController = CrashReportWindowController(crashLogText: "This is a test crash log.")
|
||||
crashReportWindowController!.testing = true
|
||||
crashReportWindowController!.showWindow(self)
|
||||
#endif
|
||||
}
|
||||
|
||||
@IBAction func debugTestCrashReportSending(_ sender: Any?) {
|
||||
#if DEBUG
|
||||
CrashReporter.sendCrashLogText("This is a test. Hi, Brent.")
|
||||
#endif
|
||||
}
|
||||
|
||||
@IBAction func forceCrash(_ sender: Any?) {
|
||||
#if DEBUG
|
||||
fatalError("This is a deliberate crash.")
|
||||
#endif
|
||||
}
|
||||
|
||||
@IBAction func openApplicationSupportFolder(_ sender: Any?) {
|
||||
#if DEBUG
|
||||
guard let appSupport = Platform.dataSubfolder(forApplication: nil, folderName: "") else { return }
|
||||
NSWorkspace.shared.open(URL(fileURLWithPath: appSupport))
|
||||
#endif
|
||||
guard let appSupport = Platform.dataSubfolder(forApplication: nil, folderName: "") else { return }
|
||||
NSWorkspace.shared.open(URL(fileURLWithPath: appSupport))
|
||||
}
|
||||
|
||||
@IBAction func toggleWebInspectorEnabled(_ sender: Any?) {
|
||||
@@ -898,8 +990,7 @@ internal extension AppDelegate {
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error" : error, "path": filename])
|
||||
logger.error("Error importing theme: \(error.localizedDescription, privacy: .public)")
|
||||
presentThemeImportError(error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,67 +1009,6 @@ internal extension AppDelegate {
|
||||
alert.beginSheetModal(for: window)
|
||||
}
|
||||
|
||||
@objc func themeImportError(_ note: Notification) {
|
||||
guard let userInfo = note.userInfo,
|
||||
let error = userInfo["error"] as? Error else {
|
||||
return
|
||||
}
|
||||
themeImportPath = userInfo["path"] as? String
|
||||
var informativeText: String = ""
|
||||
if let decodingError = error as? DecodingError {
|
||||
switch decodingError {
|
||||
case .typeMismatch(let type, _):
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because the the type—“%@”—is mismatched in the Info.plist", comment: "Type mismatch")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, type as! CVarArg) as String
|
||||
case .valueNotFound(let value, _):
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because the the value—“%@”—is not found in the Info.plist.", comment: "Decoding value missing")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, value as! CVarArg) as String
|
||||
case .keyNotFound(let codingKey, _):
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because the the key—“%@”—is not found in the Info.plist.", comment: "Decoding key missing")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, codingKey.stringValue) as String
|
||||
case .dataCorrupted(let context):
|
||||
guard let underlyingError = context.underlyingError as NSError?,
|
||||
let debugDescription = underlyingError.userInfo["NSDebugDescription"] as? String else {
|
||||
informativeText = error.localizedDescription
|
||||
break
|
||||
}
|
||||
let localizedError = NSLocalizedString("This theme cannot be used because of data corruption in the Info.plist: %@.", comment: "Decoding key missing")
|
||||
informativeText = NSString.localizedStringWithFormat(localizedError as NSString, debugDescription) as String
|
||||
|
||||
default:
|
||||
informativeText = error.localizedDescription
|
||||
}
|
||||
} else {
|
||||
informativeText = error.localizedDescription
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
let alert = NSAlert()
|
||||
alert.alertStyle = .warning
|
||||
alert.messageText = NSLocalizedString("Theme Error", comment: "Theme download error")
|
||||
alert.informativeText = informativeText
|
||||
alert.addButton(withTitle: NSLocalizedString("Open Theme Folder", comment: "Open Theme Folder"))
|
||||
alert.addButton(withTitle: NSLocalizedString("OK", comment: "OK"))
|
||||
|
||||
let button = alert.buttons.first
|
||||
button?.target = self
|
||||
button?.action = #selector(self.openThemesFolder(_:))
|
||||
alert.buttons[0].keyEquivalent = "\033"
|
||||
alert.buttons[1].keyEquivalent = "\r"
|
||||
alert.runModal()
|
||||
}
|
||||
}
|
||||
|
||||
@objc func openThemesFolder(_ sender: Any) {
|
||||
if themeImportPath == nil {
|
||||
let url = URL(fileURLWithPath: ArticleThemesManager.shared.folderPath)
|
||||
NSWorkspace.shared.open(url)
|
||||
} else {
|
||||
let url = URL(fileURLWithPath: themeImportPath!)
|
||||
NSWorkspace.shared.open(url.deletingLastPathComponent())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1020,41 +1050,31 @@ extension AppDelegate: NSWindowRestoration {
|
||||
private extension AppDelegate {
|
||||
|
||||
func handleMarkAsRead(userInfo: [AnyHashable: Any]) {
|
||||
markArticle(userInfo: userInfo, statusKey: .read)
|
||||
}
|
||||
|
||||
func handleMarkAsStarred(userInfo: [AnyHashable: Any]) {
|
||||
markArticle(userInfo: userInfo, statusKey: .starred)
|
||||
}
|
||||
|
||||
func markArticle(userInfo: [AnyHashable: Any], statusKey: ArticleStatus.Key) {
|
||||
guard let articlePathUserInfo = userInfo[UserInfoKey.articlePath] as? [AnyHashable : Any],
|
||||
let accountID = articlePathUserInfo[ArticlePathKey.accountID] as? String,
|
||||
let articleID = articlePathUserInfo[ArticlePathKey.articleID] as? String else {
|
||||
return
|
||||
}
|
||||
|
||||
let account = AccountManager.shared.existingAccount(with: accountID)
|
||||
guard account != nil else {
|
||||
guard let account = AccountManager.shared.existingAccount(with: accountID) else {
|
||||
logger.debug("No account found from notification.")
|
||||
return
|
||||
}
|
||||
let article = try? account!.fetchArticles(.articleIDs([articleID]))
|
||||
guard article != nil else {
|
||||
|
||||
guard let articles = try? account.fetchArticles(.articleIDs([articleID])), !articles.isEmpty else {
|
||||
logger.debug("No article found from search using: \(articleID, privacy: .public)")
|
||||
return
|
||||
}
|
||||
account!.markArticles(article!, statusKey: .read, flag: true) { _ in }
|
||||
|
||||
account.mark(articles: articles, statusKey: statusKey, flag: true) { _ in }
|
||||
}
|
||||
|
||||
func handleMarkAsStarred(userInfo: [AnyHashable: Any]) {
|
||||
guard let articlePathUserInfo = userInfo[UserInfoKey.articlePath] as? [AnyHashable : Any],
|
||||
let accountID = articlePathUserInfo[ArticlePathKey.accountID] as? String,
|
||||
let articleID = articlePathUserInfo[ArticlePathKey.articleID] as? String else {
|
||||
return
|
||||
}
|
||||
let account = AccountManager.shared.existingAccount(with: accountID)
|
||||
guard account != nil else {
|
||||
logger.debug("No account found from notification.")
|
||||
return
|
||||
}
|
||||
let article = try? account!.fetchArticles(.articleIDs([articleID]))
|
||||
guard article != nil else {
|
||||
logger.debug("No article found from search using: \(articleID, privacy: .public)")
|
||||
return
|
||||
}
|
||||
account!.markArticles(article!, statusKey: .starred, flag: true) { _ in }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
@@ -18,7 +18,7 @@
|
||||
<menuItem title="About NetNewsWire" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
<action selector="showAbout:" target="Voe-Tx-rLC" id="rb3-Tt-EZ4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
@@ -539,6 +539,12 @@
|
||||
<action selector="debugDropConditionalGetInfo:" target="Voe-Tx-rLC" id="X24-9X-rwG"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Clear Image Caches" id="o1k-E6-ctu">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="debugClearImageCaches:" target="Voe-Tx-rLC" id="5kp-89-U92"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Dij-Nu-eot"/>
|
||||
<menuItem title="Test Crash Reporter Window" id="gVd-kQ-efj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
|
||||
<capability name="NSView safe area layout guides" minToolsVersion="12.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@@ -174,9 +175,9 @@
|
||||
<constraint firstAttribute="width" constant="40" id="1Yw-ER-8pT"/>
|
||||
</constraints>
|
||||
</progressIndicator>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iyL-pW-cT6">
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="iyL-pW-cT6">
|
||||
<rect key="frame" x="62" y="6" width="160" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="dVE-XG-mlU">
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Label" id="dVE-XG-mlU">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -294,27 +295,23 @@
|
||||
<action selector="toggleReadArticlesFilter:" target="Ebq-4s-EwK" id="tcC-72-Npk"/>
|
||||
</connections>
|
||||
</button>
|
||||
<box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="7p6-pA-iw6">
|
||||
<rect key="frame" x="0.0" y="195" width="375" height="5"/>
|
||||
</box>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Zpk-pq-9nW" customClass="TimelineContainerView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="197"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="198"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Zpk-pq-9nW" secondAttribute="trailing" id="67d-pI-I9C"/>
|
||||
<constraint firstItem="Zpk-pq-9nW" firstAttribute="leading" secondItem="Dnl-L5-xFP" secondAttribute="leading" id="0f9-sc-5AE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iA5-go-AO0" secondAttribute="trailing" constant="12" id="9Dl-n9-vRI"/>
|
||||
<constraint firstItem="lSU-OC-sEC" firstAttribute="leading" secondItem="Dnl-L5-xFP" secondAttribute="leading" constant="8" id="Ceb-sA-ECJ"/>
|
||||
<constraint firstItem="Zpk-pq-9nW" firstAttribute="top" secondItem="7p6-pA-iw6" secondAttribute="bottom" id="KCa-8b-a6y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Zpk-pq-9nW" secondAttribute="trailing" id="Eod-fp-EiM"/>
|
||||
<constraint firstItem="lSU-OC-sEC" firstAttribute="centerY" secondItem="iA5-go-AO0" secondAttribute="centerY" id="OeL-Zp-iRT"/>
|
||||
<constraint firstItem="Zpk-pq-9nW" firstAttribute="leading" secondItem="Dnl-L5-xFP" secondAttribute="leading" id="XF2-31-E1x"/>
|
||||
<constraint firstAttribute="trailing" secondItem="7p6-pA-iw6" secondAttribute="trailing" id="fG3-fe-Stb"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Zpk-pq-9nW" secondAttribute="bottom" id="fyv-EG-PC8"/>
|
||||
<constraint firstItem="7p6-pA-iw6" firstAttribute="leading" secondItem="Dnl-L5-xFP" secondAttribute="leading" id="pZU-jW-B1h"/>
|
||||
<constraint firstItem="7p6-pA-iw6" firstAttribute="top" secondItem="Dnl-L5-xFP" secondAttribute="top" id="tUm-nX-Jce"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Zpk-pq-9nW" secondAttribute="bottom" id="RvS-Aa-GdA"/>
|
||||
<constraint firstItem="Zpk-pq-9nW" firstAttribute="top" secondItem="Dnl-L5-xFP" secondAttribute="top" id="sVz-yt-sFq"/>
|
||||
<constraint firstItem="iA5-go-AO0" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="lSU-OC-sEC" secondAttribute="trailing" constant="8" id="yCg-gc-exN"/>
|
||||
<constraint firstItem="lSU-OC-sEC" firstAttribute="top" secondItem="Dnl-L5-xFP" secondAttribute="top" constant="3" id="zay-ZJ-od3"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="PqV-qK-ND9"/>
|
||||
<viewLayoutGuide key="layoutMargins" id="Lb7-Qr-9rC"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="containerView" destination="Zpk-pq-9nW" id="Kye-yX-Wyn"/>
|
||||
@@ -332,16 +329,24 @@
|
||||
</connections>
|
||||
</customObject>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="62" y="394"/>
|
||||
<point key="canvasLocation" x="61.5" y="394"/>
|
||||
</scene>
|
||||
<!--Detail View Controller-->
|
||||
<scene sceneID="HMt-bN-oMN">
|
||||
<objects>
|
||||
<viewController id="Vho-7i-T8m" userLabel="Detail View Controller" customClass="DetailViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<customView key="view" id="cJ9-6s-66u" customClass="DetailContainerView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<customView key="view" id="cJ9-6s-66u">
|
||||
<rect key="frame" x="0.0" y="0.0" width="730" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="EAt-cc-a4X" customClass="DetailContainerView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="730" height="300"/>
|
||||
<connections>
|
||||
<outlet property="detailStatusBarView" destination="xI5-lx-RD8" id="2lM-To-54v"/>
|
||||
<outlet property="findBarContainerView" destination="lMN-Bl-G9Q" id="coK-s3-CKs"/>
|
||||
<outlet property="findBarHeightConstraint" destination="C1e-J5-baX" id="dk9-ah-mc0"/>
|
||||
</connections>
|
||||
</customView>
|
||||
<customView hidden="YES" alphaValue="0.90000000000000002" translatesAutoresizingMaskIntoConstraints="NO" id="xI5-lx-RD8" customClass="DetailStatusBarView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="6" y="2" width="12" height="20"/>
|
||||
<subviews>
|
||||
@@ -374,19 +379,20 @@
|
||||
<constraints>
|
||||
<constraint firstItem="xI5-lx-RD8" firstAttribute="leading" secondItem="cJ9-6s-66u" secondAttribute="leading" constant="6" id="5vz-ys-CAo"/>
|
||||
<constraint firstItem="lMN-Bl-G9Q" firstAttribute="top" secondItem="cJ9-6s-66u" secondAttribute="top" placeholder="YES" id="Qyj-r4-LOb"/>
|
||||
<constraint firstItem="EAt-cc-a4X" firstAttribute="top" secondItem="cJ9-6s-66u" secondAttribute="top" id="Sb7-eK-hUs"/>
|
||||
<constraint firstItem="EAt-cc-a4X" firstAttribute="bottom" secondItem="cJ9-6s-66u" secondAttribute="bottom" id="dvJ-B7-cYU"/>
|
||||
<constraint firstItem="lMN-Bl-G9Q" firstAttribute="leading" secondItem="cJ9-6s-66u" secondAttribute="leading" id="fjq-7Z-e0q"/>
|
||||
<constraint firstItem="EAt-cc-a4X" firstAttribute="leading" secondItem="cJ9-6s-66u" secondAttribute="leading" id="mYI-QQ-pG2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lMN-Bl-G9Q" secondAttribute="trailing" id="oth-5X-F9R"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="xI5-lx-RD8" secondAttribute="trailing" constant="6" id="pbD-LN-Gk1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EAt-cc-a4X" secondAttribute="trailing" id="yWN-Th-puZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="xI5-lx-RD8" secondAttribute="bottom" constant="2" id="zsv-B0-ChW"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="detailStatusBarView" destination="xI5-lx-RD8" id="yIZ-aP-fKF"/>
|
||||
<outlet property="findBarContainerView" destination="lMN-Bl-G9Q" id="zMP-iV-uSN"/>
|
||||
<outlet property="findBarHeightConstraint" destination="C1e-J5-baX" id="Q4g-LU-JWK"/>
|
||||
</connections>
|
||||
<viewLayoutGuide key="safeArea" id="kji-Gx-zvn"/>
|
||||
<viewLayoutGuide key="layoutMargins" id="Nri-tr-pWM"/>
|
||||
</customView>
|
||||
<connections>
|
||||
<outlet property="containerView" destination="cJ9-6s-66u" id="gXc-Pz-9sQ"/>
|
||||
<outlet property="containerView" destination="EAt-cc-a4X" id="oqf-yI-VIb"/>
|
||||
<outlet property="statusBarView" destination="xI5-lx-RD8" id="meP-4g-U63"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
|
||||
@@ -73,3 +73,48 @@ extension Browser {
|
||||
NSLocalizedString("Open in Browser in Background", comment: "Open in Browser in Background menu item title")
|
||||
}
|
||||
}
|
||||
|
||||
extension Browser {
|
||||
|
||||
/// Open multiple pages in the default browser, warning if over a certain number of URLs are passed.
|
||||
/// - Parameters:
|
||||
/// - urlStrings: The URL strings to open.
|
||||
/// - window: The window on which to display the "over limit" alert sheet. If `nil`, will be displayed as a
|
||||
/// modal dialog.
|
||||
/// - invertPreference: Whether to invert the user's "Open web pages in background in browser" preference.
|
||||
static func open(_ urlStrings: [String], fromWindow window: NSWindow?, invertPreference: Bool = false) {
|
||||
if urlStrings.count > 500 {
|
||||
return
|
||||
}
|
||||
|
||||
func doOpenURLs() {
|
||||
for urlString in urlStrings {
|
||||
Browser.open(urlString, invertPreference: invertPreference)
|
||||
}
|
||||
}
|
||||
|
||||
if urlStrings.count > 20 {
|
||||
let alert = NSAlert()
|
||||
let messageFormat = NSLocalizedString("Are you sure you want to open %ld articles in your browser?", comment: "Open in Browser confirmation alert message format")
|
||||
alert.messageText = String.localizedStringWithFormat(messageFormat, urlStrings.count)
|
||||
let confirmButtonTitleFormat = NSLocalizedString("Open %ld Articles", comment: "Open URLs in Browser confirm button format")
|
||||
alert.addButton(withTitle: String.localizedStringWithFormat(confirmButtonTitleFormat, urlStrings.count))
|
||||
alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button"))
|
||||
|
||||
if let window {
|
||||
alert.beginSheetModal(for: window) { response in
|
||||
if response == .alertFirstButtonReturn {
|
||||
doOpenURLs()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if alert.runModal() == .alertFirstButtonReturn {
|
||||
doOpenURLs()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
doOpenURLs()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// AboutNetNewsWireView.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Stuart Breckenridge on 03/10/2022.
|
||||
// Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@available(macOS 12, *)
|
||||
struct AboutNetNewsWireView: View {
|
||||
var body: some View {
|
||||
HStack {
|
||||
Spacer()
|
||||
VStack(spacing: 8) {
|
||||
Spacer()
|
||||
|
||||
Image("About")
|
||||
.resizable()
|
||||
.frame(width: 75, height: 75)
|
||||
|
||||
Text("NetNewsWire")
|
||||
.font(.headline)
|
||||
|
||||
Text("\(Bundle.main.versionNumber) (\(Bundle.main.buildNumber))")
|
||||
.foregroundColor(.secondary)
|
||||
.font(.callout)
|
||||
|
||||
Text("By Brent Simmons and the NetNewsWire team.")
|
||||
.font(.subheadline)
|
||||
|
||||
Text("[netnewswire.com](https://netnewswire.com)")
|
||||
.font(.callout)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text(verbatim: "Copyright © Brent Simmons 2002 - \(Calendar.current.component(.year, from: .now))")
|
||||
.font(.callout)
|
||||
.foregroundColor(.secondary)
|
||||
.padding(.bottom)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 400, height: 400)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 12, *)
|
||||
struct AboutNetNewsWireView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
AboutNetNewsWireView()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// AboutWindowController.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Stuart Breckenridge on 03/10/2022.
|
||||
// Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
import RSCore
|
||||
|
||||
extension NSToolbarItem.Identifier {
|
||||
static let aboutGroup = NSToolbarItem.Identifier("about.toolbar.group")
|
||||
}
|
||||
|
||||
extension NSUserInterfaceItemIdentifier {
|
||||
static let aboutNetNewsWire = NSUserInterfaceItemIdentifier("about.netnewswire")
|
||||
}
|
||||
|
||||
// MARK: - AboutWindowController
|
||||
|
||||
@available(macOS 12, *)
|
||||
class AboutWindowController: NSWindowController, NSToolbarDelegate {
|
||||
|
||||
var hostingController: AboutHostingController
|
||||
|
||||
override init(window: NSWindow?) {
|
||||
self.hostingController = AboutHostingController(rootView: AnyView(AboutNetNewsWireView()))
|
||||
super.init(window: window)
|
||||
let window = NSWindow(contentViewController: hostingController)
|
||||
window.identifier = .aboutNetNewsWire
|
||||
window.standardWindowButton(.zoomButton)?.isEnabled = false
|
||||
window.titleVisibility = .hidden
|
||||
self.window = window
|
||||
self.hostingController.configureToolbar()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - AboutHostingController
|
||||
|
||||
@available(macOS 12, *)
|
||||
class AboutHostingController: NSHostingController<AnyView>, NSToolbarDelegate {
|
||||
|
||||
private lazy var segmentedControl: NSSegmentedControl = {
|
||||
let control = NSSegmentedControl(labels: ["About", "Credits"],
|
||||
trackingMode: .selectOne,
|
||||
target: self,
|
||||
action: #selector(segmentedControlSelectionChanged(_:)))
|
||||
control.segmentCount = 2
|
||||
control.setSelected(true, forSegment: 0)
|
||||
return control
|
||||
}()
|
||||
|
||||
override init(rootView: AnyView) {
|
||||
super.init(rootView: rootView)
|
||||
}
|
||||
|
||||
@MainActor required dynamic init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
public func configureToolbar() {
|
||||
let toolbar = NSToolbar(identifier: NSToolbar.Identifier("netnewswire.about.toolbar"))
|
||||
toolbar.delegate = self
|
||||
toolbar.autosavesConfiguration = false
|
||||
toolbar.allowsUserCustomization = false
|
||||
view.window?.toolbar = toolbar
|
||||
view.window?.toolbarStyle = .unified
|
||||
toolbar.insertItem(withItemIdentifier: .flexibleSpace, at: 0)
|
||||
toolbar.insertItem(withItemIdentifier: .flexibleSpace, at: 2)
|
||||
}
|
||||
|
||||
// MARK: NSToolbarDelegate
|
||||
|
||||
func toolbar(_ toolbar: NSToolbar, itemForItemIdentifier itemIdentifier: NSToolbarItem.Identifier, willBeInsertedIntoToolbar flag: Bool) -> NSToolbarItem? {
|
||||
switch itemIdentifier {
|
||||
|
||||
case .aboutGroup:
|
||||
let toolbarItem = NSToolbarItem(itemIdentifier: .aboutGroup)
|
||||
toolbarItem.view = segmentedControl
|
||||
toolbarItem.autovalidates = true
|
||||
return toolbarItem
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func toolbarAllowedItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
|
||||
return [.aboutGroup]
|
||||
}
|
||||
|
||||
func toolbarWillAddItem(_ notification: Notification) {
|
||||
//
|
||||
}
|
||||
|
||||
func toolbarDidRemoveItem(_ notification: Notification) {
|
||||
//
|
||||
}
|
||||
|
||||
func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
|
||||
return [.aboutGroup]
|
||||
}
|
||||
|
||||
func toolbarSelectableItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
|
||||
return []
|
||||
}
|
||||
|
||||
// MARK: - Target/Action
|
||||
@objc
|
||||
func segmentedControlSelectionChanged(_ sender: NSSegmentedControl) {
|
||||
if sender.selectedSegment == 0 {
|
||||
rootView = AnyView(AboutNetNewsWireView())
|
||||
} else {
|
||||
rootView = AnyView(CreditsNetNewsWireView())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// CreditsNetNewsWireView.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Stuart Breckenridge on 03/10/2022.
|
||||
// Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@available(macOS 12, *)
|
||||
struct CreditsNetNewsWireView: View, LoadableAboutData {
|
||||
var body: some View {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
Spacer()
|
||||
.frame(height: 12)
|
||||
Section("Primary Contributors") {
|
||||
GroupBox {
|
||||
ForEach(0..<about.PrimaryContributors.count, id: \.self) { i in
|
||||
contributorView(about.PrimaryContributors[i])
|
||||
.padding(.vertical, 2)
|
||||
.listRowInsets(EdgeInsets(top: 0, leading: 12, bottom: 0, trailing: 12))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Section("Additional Contributors") {
|
||||
GroupBox {
|
||||
ForEach(0..<about.AdditionalContributors.count, id: \.self) { i in
|
||||
contributorView(about.AdditionalContributors[i])
|
||||
.padding(.vertical, 2)
|
||||
.listRowInsets(EdgeInsets(top: 0, leading: 12, bottom: 0, trailing: 12))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Section("Thanks") {
|
||||
GroupBox {
|
||||
Text(about.ThanksMarkdown)
|
||||
.multilineTextAlignment(.center)
|
||||
.font(.callout)
|
||||
.padding(.vertical, 2)
|
||||
}
|
||||
|
||||
}
|
||||
Spacer()
|
||||
.frame(height: 12)
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.frame(width: 400, height: 400)
|
||||
}
|
||||
|
||||
func contributorView(_ appCredit: AboutData.Contributor) -> some View {
|
||||
HStack {
|
||||
Text(appCredit.name)
|
||||
Spacer()
|
||||
if let role = appCredit.role {
|
||||
Text(role)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
Image(systemName: "info.circle")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.onTapGesture {
|
||||
guard let url = appCredit.url else { return }
|
||||
if let _ = URL(string: url) {
|
||||
Browser.open(url, inBackground: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 12, *)
|
||||
struct CreditsNetNewsWireView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CreditsNetNewsWireView()
|
||||
}
|
||||
}
|
||||
@@ -30,11 +30,10 @@ final class DetailContainerView: NSView, NSTextFinderBarContainer {
|
||||
contentView.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(contentView, positioned: .below, relativeTo: detailStatusBarView)
|
||||
|
||||
// Constrain the content view to fill the available space on all sides except the top, which we'll constrain to the find bar
|
||||
var constraints = constraintsToMakeSubViewFullSize(contentView).filter { $0.firstAttribute != .top }
|
||||
// Constrain the content view to fill the available space on all sides
|
||||
var constraints = constraintsToMakeSubViewFullSize(contentView)
|
||||
|
||||
constraints.append(findBarContainerView.topAnchor.constraint(equalTo: self.safeAreaLayoutGuide.topAnchor))
|
||||
constraints.append(findBarContainerView.bottomAnchor.constraint(equalTo: contentView.topAnchor))
|
||||
NSLayoutConstraint.activate(constraints)
|
||||
contentViewConstraints = constraints
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ private extension NSUserInterfaceItemIdentifier {
|
||||
|
||||
private extension DetailWebView {
|
||||
|
||||
static let menuItemIdentifiersToHide: [NSUserInterfaceItemIdentifier] = [.DetailMenuItemIdentifierReload, .DetailMenuItemIdentifierOpenLink]
|
||||
static let menuItemIdentifiersToHide: [NSUserInterfaceItemIdentifier] = [.DetailMenuItemIdentifierReload]
|
||||
static let menuItemIdentifierMatchStrings = ["newwindow", "download"]
|
||||
|
||||
func shouldHideMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
||||
|
||||
@@ -204,7 +204,15 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
public func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||
|
||||
if item.action == #selector(copyArticleURL(_:)) {
|
||||
return canCopyArticleURL()
|
||||
let canCopyArticleURL = canCopyArticleURL()
|
||||
|
||||
if let item = item as? NSMenuItem {
|
||||
let format = NSLocalizedString("Copy Article URL", comment: "Copy Article URL");
|
||||
|
||||
item.title = String.localizedStringWithFormat(format, selectedArticles?.count ?? 0)
|
||||
}
|
||||
|
||||
return canCopyArticleURL
|
||||
}
|
||||
|
||||
if item.action == #selector(copyExternalURL(_:)) {
|
||||
@@ -321,21 +329,21 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
}
|
||||
|
||||
@IBAction func copyArticleURL(_ sender: Any?) {
|
||||
if let link = oneSelectedArticle?.preferredURL?.absoluteString {
|
||||
URLPasteboardWriter.write(urlString: link, to: .general)
|
||||
if let currentLinks {
|
||||
URLPasteboardWriter.write(urlStrings: currentLinks, alertingIn: window)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func copyExternalURL(_ sender: Any?) {
|
||||
if let link = oneSelectedArticle?.externalLink {
|
||||
URLPasteboardWriter.write(urlString: link, to: .general)
|
||||
if let links = selectedArticles?.compactMap({ $0.externalLink }) {
|
||||
URLPasteboardWriter.write(urlStrings: links, to: .general)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func openArticleInBrowser(_ sender: Any?) {
|
||||
if let link = currentLink {
|
||||
Browser.open(link, invertPreference: NSApp.currentEvent?.modifierFlags.contains(.shift) ?? false)
|
||||
}
|
||||
guard let selectedArticles else { return }
|
||||
let urlStrings = selectedArticles.compactMap { $0.preferredLink }
|
||||
Browser.open(urlStrings, fromWindow: window, invertPreference: NSApp.currentEvent?.modifierFlags.contains(.shift) ?? false)
|
||||
}
|
||||
|
||||
@IBAction func openInBrowser(_ sender: Any?) {
|
||||
@@ -529,16 +537,17 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
assertionFailure("Expected toolbarShowShareMenu to be called only by the Share item in the toolbar.")
|
||||
return
|
||||
}
|
||||
guard let view = shareToolbarItem.view else {
|
||||
// TODO: handle menu form representation
|
||||
return
|
||||
}
|
||||
|
||||
let sortedArticles = selectedArticles.sortedByDate(.orderedAscending)
|
||||
let items = sortedArticles.map { ArticlePasteboardWriter(article: $0) }
|
||||
let sharingServicePicker = NSSharingServicePicker(items: items)
|
||||
sharingServicePicker.delegate = sharingServicePickerDelegate
|
||||
sharingServicePicker.show(relativeTo: view.bounds, of: view, preferredEdge: .minY)
|
||||
|
||||
if let view = shareToolbarItem.view, view.window != nil {
|
||||
sharingServicePicker.show(relativeTo: view.bounds, of: view, preferredEdge: .minY)
|
||||
} else if let view = window?.contentView {
|
||||
sharingServicePicker.show(relativeTo: CGRect(x: view.frame.width / 2.0, y: view.frame.height - 4, width: 1, height: 1), of: view, preferredEdge: .minY)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func moveFocusToSearchField(_ sender: Any?) {
|
||||
@@ -628,6 +637,10 @@ extension MainWindowController: NSWindowDelegate {
|
||||
|
||||
extension MainWindowController: SidebarDelegate {
|
||||
|
||||
var directlyMarkedAsUnreadArticles: Set<Article>? {
|
||||
return timelineContainerViewController?.currentTimelineViewController?.directlyMarkedAsUnreadArticles
|
||||
}
|
||||
|
||||
func sidebarSelectionDidChange(_: SidebarViewController, selectedObjects: [AnyObject]?) {
|
||||
// Don’t update the timeline if it already has those objects.
|
||||
let representedObjectsAreTheSame = timelineContainerViewController?.regularTimelineViewControllerHasRepresentedObjects(selectedObjects) ?? false
|
||||
@@ -666,6 +679,9 @@ extension MainWindowController: TimelineContainerViewControllerDelegate {
|
||||
articleExtractor = nil
|
||||
isShowingExtractedArticle = false
|
||||
makeToolbarValidate()
|
||||
if #available(macOS 13.0, *) { } else {
|
||||
updateShareToolbarItemMenu()
|
||||
}
|
||||
|
||||
let detailState: DetailState
|
||||
if let articles = articles {
|
||||
@@ -894,11 +910,23 @@ extension MainWindowController: NSToolbarDelegate {
|
||||
button.action = #selector(toggleArticleExtractor(_:))
|
||||
button.rightClickAction = #selector(showArticleExtractorMenu(_:))
|
||||
toolbarItem.view = button
|
||||
toolbarItem.menuFormRepresentation = NSMenuItem(title: description, action: #selector(toggleArticleExtractor(_:)), keyEquivalent: "")
|
||||
return toolbarItem
|
||||
|
||||
case .share:
|
||||
let title = NSLocalizedString("Share", comment: "Share")
|
||||
return buildToolbarButton(.share, title, AppAssets.shareImage, "toolbarShowShareMenu:")
|
||||
let image = AppAssets.shareImage
|
||||
if #available(macOS 13.0, *) {
|
||||
// `item.view` is required for properly positioning the sharing picker.
|
||||
return buildToolbarButton(.share, title, image, "toolbarShowShareMenu:", usesCustomButtonView: true)
|
||||
} else {
|
||||
let item = NSMenuToolbarItem(itemIdentifier: .share)
|
||||
item.image = image
|
||||
item.toolTip = title
|
||||
item.label = title
|
||||
item.showsIndicator = false
|
||||
return item
|
||||
}
|
||||
|
||||
case .openInBrowser:
|
||||
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||
@@ -1043,7 +1071,11 @@ private extension MainWindowController {
|
||||
}
|
||||
|
||||
var currentLink: String? {
|
||||
return oneSelectedArticle?.preferredLink
|
||||
return selectedArticles?.first { $0.preferredLink != nil }?.preferredLink
|
||||
}
|
||||
|
||||
var currentLinks: [String?]? {
|
||||
return selectedArticles?.map { $0.preferredLink }
|
||||
}
|
||||
|
||||
// MARK: - State Restoration
|
||||
@@ -1081,7 +1113,11 @@ private extension MainWindowController {
|
||||
// MARK: - Command Validation
|
||||
|
||||
func canCopyArticleURL() -> Bool {
|
||||
return currentLink != nil
|
||||
if let currentLinks, currentLinks.count != 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func canCopyExternalURL() -> Bool {
|
||||
@@ -1130,16 +1166,13 @@ private extension MainWindowController {
|
||||
|
||||
if let toolbarItem = item as? NSToolbarItem {
|
||||
toolbarItem.toolTip = commandName
|
||||
toolbarItem.image = markingRead ? AppAssets.readClosedImage : AppAssets.readOpenImage
|
||||
}
|
||||
|
||||
if let menuItem = item as? NSMenuItem {
|
||||
menuItem.title = commandName
|
||||
}
|
||||
|
||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||
button.image = markingRead ? AppAssets.readClosedImage : AppAssets.readOpenImage
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -1220,16 +1253,13 @@ private extension MainWindowController {
|
||||
|
||||
if let toolbarItem = item as? NSToolbarItem {
|
||||
toolbarItem.toolTip = commandName
|
||||
toolbarItem.image = starring ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
||||
}
|
||||
|
||||
if let menuItem = item as? NSMenuItem {
|
||||
menuItem.title = commandName
|
||||
}
|
||||
|
||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||
button.image = starring ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -1252,24 +1282,24 @@ private extension MainWindowController {
|
||||
|
||||
guard let isReadFiltered = timelineContainerViewController?.isReadFiltered else {
|
||||
(item as? NSMenuItem)?.title = hideCommand
|
||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||
if let toolbarItem = item as? NSToolbarItem {
|
||||
toolbarItem.toolTip = hideCommand
|
||||
button.image = AppAssets.filterInactive
|
||||
toolbarItem.image = AppAssets.filterInactive
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
if isReadFiltered {
|
||||
(item as? NSMenuItem)?.title = showCommand
|
||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||
if let toolbarItem = item as? NSToolbarItem {
|
||||
toolbarItem.toolTip = showCommand
|
||||
button.image = AppAssets.filterActive
|
||||
toolbarItem.image = AppAssets.filterActive
|
||||
}
|
||||
} else {
|
||||
(item as? NSMenuItem)?.title = hideCommand
|
||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||
if let toolbarItem = item as? NSToolbarItem {
|
||||
toolbarItem.toolTip = hideCommand
|
||||
button.image = AppAssets.filterInactive
|
||||
toolbarItem.image = AppAssets.filterInactive
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1386,19 +1416,26 @@ private extension MainWindowController {
|
||||
}
|
||||
}
|
||||
|
||||
func buildToolbarButton(_ itemIdentifier: NSToolbarItem.Identifier, _ title: String, _ image: NSImage, _ selector: String) -> NSToolbarItem {
|
||||
func buildToolbarButton(_ itemIdentifier: NSToolbarItem.Identifier, _ title: String, _ image: NSImage, _ selector: String, usesCustomButtonView: Bool = false) -> NSToolbarItem {
|
||||
let toolbarItem = RSToolbarItem(itemIdentifier: itemIdentifier)
|
||||
toolbarItem.autovalidates = true
|
||||
|
||||
let button = NSButton()
|
||||
button.bezelStyle = .texturedRounded
|
||||
button.image = image
|
||||
button.imageScaling = .scaleProportionallyDown
|
||||
button.action = Selector((selector))
|
||||
|
||||
toolbarItem.view = button
|
||||
toolbarItem.toolTip = title
|
||||
toolbarItem.label = title
|
||||
|
||||
if usesCustomButtonView {
|
||||
let button = NSButton()
|
||||
button.bezelStyle = .texturedRounded
|
||||
button.image = image
|
||||
button.imageScaling = .scaleProportionallyDown
|
||||
button.action = Selector((selector))
|
||||
toolbarItem.view = button
|
||||
toolbarItem.menuFormRepresentation = NSMenuItem(title: title, action: Selector((selector)), keyEquivalent: "")
|
||||
} else {
|
||||
toolbarItem.image = image
|
||||
toolbarItem.isBordered = true
|
||||
toolbarItem.action = Selector((selector))
|
||||
}
|
||||
return toolbarItem
|
||||
}
|
||||
|
||||
@@ -1434,7 +1471,7 @@ private extension MainWindowController {
|
||||
let defaultThemeItem = NSMenuItem()
|
||||
defaultThemeItem.title = ArticleTheme.defaultTheme.name
|
||||
defaultThemeItem.action = #selector(selectArticleTheme(_:))
|
||||
defaultThemeItem.state = defaultThemeItem.title == ArticleThemesManager.shared.currentThemeName ? .on : .off
|
||||
defaultThemeItem.state = defaultThemeItem.title == ArticleThemesManager.shared.currentTheme.name ? .on : .off
|
||||
articleThemeMenu.addItem(defaultThemeItem)
|
||||
|
||||
articleThemeMenu.addItem(NSMenuItem.separator())
|
||||
@@ -1443,7 +1480,7 @@ private extension MainWindowController {
|
||||
let themeItem = NSMenuItem()
|
||||
themeItem.title = themeName
|
||||
themeItem.action = #selector(selectArticleTheme(_:))
|
||||
themeItem.state = themeItem.title == ArticleThemesManager.shared.currentThemeName ? .on : .off
|
||||
themeItem.state = themeItem.title == ArticleThemesManager.shared.currentTheme.name ? .on : .off
|
||||
articleThemeMenu.addItem(themeItem)
|
||||
}
|
||||
|
||||
@@ -1451,5 +1488,17 @@ private extension MainWindowController {
|
||||
articleThemePopUpButton?.menu = articleThemeMenu
|
||||
}
|
||||
|
||||
func updateShareToolbarItemMenu() {
|
||||
guard let shareToolbarItem = shareToolbarItem as? NSMenuToolbarItem else {
|
||||
return
|
||||
}
|
||||
if let shareMenu = shareMenu {
|
||||
shareToolbarItem.isEnabled = true
|
||||
shareToolbarItem.menu = shareMenu
|
||||
} else {
|
||||
shareToolbarItem.isEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ final class SidebarStatusBarView: NSView {
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
|
||||
progressIndicator.isHidden = true
|
||||
progressIndicator.usesThreadedAnimation = true
|
||||
progressLabel.isHidden = true
|
||||
|
||||
let progressLabelFontSize = progressLabel.font?.pointSize ?? 13.0
|
||||
@@ -43,20 +43,18 @@ final class SidebarStatusBarView: NSView {
|
||||
}
|
||||
|
||||
@objc func updateUI() {
|
||||
|
||||
guard let progress = progress else {
|
||||
stopProgressIfNeeded()
|
||||
return
|
||||
}
|
||||
|
||||
updateProgressIndicator(progress)
|
||||
updateProgressLabel(progress)
|
||||
progressLabel.stringValue = progress.label
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
@objc dynamic func progressDidChange(_ notification: Notification) {
|
||||
|
||||
progress = AccountManager.shared.combinedRefreshProgress
|
||||
}
|
||||
}
|
||||
@@ -68,10 +66,10 @@ private extension SidebarStatusBarView {
|
||||
static let animationDuration = 0.2
|
||||
|
||||
func stopProgressIfNeeded() {
|
||||
|
||||
if !isAnimatingProgress {
|
||||
return
|
||||
}
|
||||
|
||||
isAnimatingProgress = false
|
||||
self.progressIndicator.stopAnimation(self)
|
||||
progressIndicator.isHidden = true
|
||||
@@ -88,10 +86,10 @@ private extension SidebarStatusBarView {
|
||||
}
|
||||
|
||||
func startProgressIfNeeded() {
|
||||
|
||||
if isAnimatingProgress {
|
||||
return
|
||||
}
|
||||
|
||||
isAnimatingProgress = true
|
||||
progressIndicator.isHidden = false
|
||||
progressLabel.isHidden = false
|
||||
@@ -108,12 +106,16 @@ private extension SidebarStatusBarView {
|
||||
}
|
||||
|
||||
func updateProgressIndicator(_ progress: CombinedRefreshProgress) {
|
||||
|
||||
if progress.isComplete {
|
||||
stopProgressIfNeeded()
|
||||
return
|
||||
}
|
||||
|
||||
if progressIndicator.isIndeterminate != progress.isIndeterminate {
|
||||
stopProgressIfNeeded()
|
||||
progressIndicator.isIndeterminate = progress.isIndeterminate
|
||||
}
|
||||
|
||||
startProgressIfNeeded()
|
||||
|
||||
let maxValue = Double(progress.numberOfTasks)
|
||||
@@ -127,16 +129,4 @@ private extension SidebarStatusBarView {
|
||||
}
|
||||
}
|
||||
|
||||
func updateProgressLabel(_ progress: CombinedRefreshProgress) {
|
||||
|
||||
if progress.isComplete {
|
||||
progressLabel.stringValue = ""
|
||||
return
|
||||
}
|
||||
|
||||
let formatString = NSLocalizedString("%@ of %@", comment: "Status bar progress")
|
||||
let s = NSString(format: formatString as NSString, NSNumber(value: progress.numberCompleted), NSNumber(value: progress.numberOfTasks))
|
||||
|
||||
progressLabel.stringValue = s as String
|
||||
}
|
||||
}
|
||||
@@ -69,8 +69,16 @@ extension SidebarViewController {
|
||||
return
|
||||
}
|
||||
|
||||
let articles = unreadArticles(for: objects)
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: Array(articles), markingRead: true, undoManager: undoManager) else {
|
||||
var markableArticles = unreadArticles(for: objects)
|
||||
if let directlyMarkedAsUnreadArticles = delegate?.directlyMarkedAsUnreadArticles {
|
||||
markableArticles = markableArticles.subtracting(directlyMarkedAsUnreadArticles)
|
||||
}
|
||||
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: markableArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
|
||||
@@ -17,6 +17,7 @@ extension Notification.Name {
|
||||
}
|
||||
|
||||
protocol SidebarDelegate: AnyObject {
|
||||
var directlyMarkedAsUnreadArticles: Set<Article>? { get }
|
||||
func sidebarSelectionDidChange(_: SidebarViewController, selectedObjects: [AnyObject]?)
|
||||
func unreadCount(for: AnyObject) -> Int
|
||||
func sidebarInvalidatedRestorationState(_: SidebarViewController)
|
||||
@@ -256,7 +257,11 @@ protocol SidebarDelegate: AnyObject {
|
||||
return
|
||||
}
|
||||
if AppDefaults.shared.feedDoubleClickMarkAsRead, let articles = try? singleSelectedWebFeed?.fetchUnreadArticles() {
|
||||
if let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: Array(articles), markingRead: true, undoManager: undoManager) {
|
||||
if let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: Array(articles),
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager) {
|
||||
runCommand(markReadCommand)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,12 +39,12 @@ extension TimelineViewController {
|
||||
|
||||
@objc func markArticlesReadFromContextualMenu(_ sender: Any?) {
|
||||
guard let articles = articles(from: sender) else { return }
|
||||
markArticles(articles, read: true)
|
||||
markArticles(articles, read: true, directlyMarked: true)
|
||||
}
|
||||
|
||||
@objc func markArticlesUnreadFromContextualMenu(_ sender: Any?) {
|
||||
guard let articles = articles(from: sender) else { return }
|
||||
markArticles(articles, read: false)
|
||||
markArticles(articles, read: false, directlyMarked: true)
|
||||
}
|
||||
|
||||
@objc func markAboveArticlesReadFromContextualMenu(_ sender: Any?) {
|
||||
@@ -59,14 +59,14 @@ extension TimelineViewController {
|
||||
|
||||
@objc func markArticlesStarredFromContextualMenu(_ sender: Any?) {
|
||||
guard let articles = articles(from: sender) else { return }
|
||||
markArticles(articles, starred: true)
|
||||
markArticles(articles, starred: true, directlyMarked: true)
|
||||
}
|
||||
|
||||
@objc func markArticlesUnstarredFromContextualMenu(_ sender: Any?) {
|
||||
guard let articles = articles(from: sender) else {
|
||||
return
|
||||
}
|
||||
markArticles(articles, starred: false)
|
||||
markArticles(articles, starred: false, directlyMarked: true)
|
||||
}
|
||||
|
||||
@objc func selectFeedInSidebarFromContextualMenu(_ sender: Any?) {
|
||||
@@ -81,7 +81,11 @@ extension TimelineViewController {
|
||||
return
|
||||
}
|
||||
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: feedArticles, markingRead: true, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: feedArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -89,18 +93,19 @@ extension TimelineViewController {
|
||||
}
|
||||
|
||||
@objc func openInBrowserFromContextualMenu(_ sender: Any?) {
|
||||
|
||||
guard let menuItem = sender as? NSMenuItem, let urlString = menuItem.representedObject as? String else {
|
||||
guard let menuItem = sender as? NSMenuItem, let urlStrings = menuItem.representedObject as? [String] else {
|
||||
return
|
||||
}
|
||||
Browser.open(urlString, inBackground: false)
|
||||
|
||||
Browser.open(urlStrings, fromWindow: self.view.window, invertPreference: NSApp.currentEvent?.modifierFlags.contains(.shift) ?? false)
|
||||
}
|
||||
|
||||
@objc func copyURLFromContextualMenu(_ sender: Any?) {
|
||||
guard let menuItem = sender as? NSMenuItem, let urlString = menuItem.representedObject as? String else {
|
||||
guard let menuItem = sender as? NSMenuItem, let urlStrings = menuItem.representedObject as? [String?] else {
|
||||
return
|
||||
}
|
||||
URLPasteboardWriter.write(urlString: urlString, to: .general)
|
||||
|
||||
URLPasteboardWriter.write(urlStrings: urlStrings, alertingIn: self.view.window)
|
||||
}
|
||||
|
||||
@objc func performShareServiceFromContextualMenu(_ sender: Any?) {
|
||||
@@ -114,16 +119,21 @@ extension TimelineViewController {
|
||||
|
||||
private extension TimelineViewController {
|
||||
|
||||
func markArticles(_ articles: [Article], read: Bool) {
|
||||
markArticles(articles, statusKey: .read, flag: read)
|
||||
func markArticles(_ articles: [Article], read: Bool, directlyMarked: Bool) {
|
||||
markArticles(articles, statusKey: .read, flag: read, directlyMarked: directlyMarked)
|
||||
}
|
||||
|
||||
func markArticles(_ articles: [Article], starred: Bool) {
|
||||
markArticles(articles, statusKey: .starred, flag: starred)
|
||||
func markArticles(_ articles: [Article], starred: Bool, directlyMarked: Bool) {
|
||||
markArticles(articles, statusKey: .starred, flag: starred, directlyMarked: directlyMarked)
|
||||
}
|
||||
|
||||
func markArticles(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool) {
|
||||
guard let undoManager = undoManager, let markStatusCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager) else {
|
||||
func markArticles(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool, directlyMarked: Bool) {
|
||||
guard let undoManager = undoManager,
|
||||
let markStatusCommand = MarkStatusCommand(initialArticles: articles,
|
||||
statusKey: statusKey,
|
||||
flag: flag,
|
||||
directlyMarked: directlyMarked,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -176,14 +186,19 @@ private extension TimelineViewController {
|
||||
menu.addItem(markAllMenuItem)
|
||||
}
|
||||
}
|
||||
|
||||
if articles.count == 1, let link = articles.first!.preferredLink {
|
||||
|
||||
let links = articles.map { $0.preferredLink }
|
||||
let compactLinks = links.compactMap { $0 }
|
||||
|
||||
if compactLinks.count > 0 {
|
||||
menu.addSeparatorIfNeeded()
|
||||
menu.addItem(openInBrowserMenuItem(link))
|
||||
menu.addItem(openInBrowserMenuItem(compactLinks))
|
||||
menu.addItem(openInBrowserReversedMenuItem(compactLinks))
|
||||
|
||||
menu.addSeparatorIfNeeded()
|
||||
menu.addItem(copyArticleURLMenuItem(link))
|
||||
|
||||
if let externalLink = articles.first?.externalLink, externalLink != link {
|
||||
menu.addItem(copyArticleURLsMenuItem(links))
|
||||
|
||||
if let externalLink = articles.first?.externalLink, externalLink != links.first {
|
||||
menu.addItem(copyExternalURLMenuItem(externalLink))
|
||||
}
|
||||
}
|
||||
@@ -274,13 +289,21 @@ private extension TimelineViewController {
|
||||
return menuItem(menuText, #selector(markAllInFeedAsRead(_:)), articles)
|
||||
}
|
||||
|
||||
func openInBrowserMenuItem(_ urlString: String) -> NSMenuItem {
|
||||
func openInBrowserMenuItem(_ urlStrings: [String]) -> NSMenuItem {
|
||||
return menuItem(NSLocalizedString("Open in Browser", comment: "Command"), #selector(openInBrowserFromContextualMenu(_:)), urlStrings)
|
||||
}
|
||||
|
||||
return menuItem(NSLocalizedString("Open in Browser", comment: "Command"), #selector(openInBrowserFromContextualMenu(_:)), urlString)
|
||||
func openInBrowserReversedMenuItem(_ urlStrings: [String]) -> NSMenuItem {
|
||||
let item = menuItem(Browser.titleForOpenInBrowserInverted, #selector(openInBrowserFromContextualMenu(_:)), urlStrings)
|
||||
item.keyEquivalentModifierMask = .shift
|
||||
item.isAlternate = true
|
||||
return item;
|
||||
}
|
||||
|
||||
func copyArticleURLMenuItem(_ urlString: String) -> NSMenuItem {
|
||||
return menuItem(NSLocalizedString("Copy Article URL", comment: "Command"), #selector(copyURLFromContextualMenu(_:)), urlString)
|
||||
func copyArticleURLsMenuItem(_ urlStrings: [String?]) -> NSMenuItem {
|
||||
let format = NSLocalizedString("Copy Article URL", comment: "Command")
|
||||
let title = String.localizedStringWithFormat(format, urlStrings.count)
|
||||
return menuItem(title, #selector(copyURLFromContextualMenu(_:)), urlStrings)
|
||||
}
|
||||
|
||||
func copyExternalURLMenuItem(_ urlString: String) -> NSMenuItem {
|
||||
|
||||
@@ -65,7 +65,6 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
if !representedObjectArraysAreEqual(oldValue, representedObjects) {
|
||||
unreadCount = 0
|
||||
|
||||
selectionDidChange(nil)
|
||||
if showsSearchResults {
|
||||
fetchAndReplaceArticlesAsync()
|
||||
} else {
|
||||
@@ -75,6 +74,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
}
|
||||
updateUnreadCount()
|
||||
}
|
||||
selectionDidChange(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,10 +123,13 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
showFeedNames = .feed
|
||||
}
|
||||
|
||||
directlyMarkedAsUnreadArticles = Set<Article>()
|
||||
articleRowMap = [String: [Int]]()
|
||||
tableView.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
var directlyMarkedAsUnreadArticles = Set<Article>()
|
||||
|
||||
var unreadCount: Int = 0 {
|
||||
didSet {
|
||||
@@ -219,6 +222,8 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(accountsDidChange(_:)), name: .UserDidDeleteAccount, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(containerChildrenDidChange(_:)), name: .ChildrenDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(markStatusCommandDidDirectMarking(_:)), name: .MarkStatusCommandDidDirectMarking, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(markStatusCommandDidUndoDirectMarking(_:)), name: .MarkStatusCommandDidUndoDirectMarking, object: nil)
|
||||
didRegisterForNotifications = true
|
||||
}
|
||||
}
|
||||
@@ -230,7 +235,13 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
// MARK: - API
|
||||
|
||||
func markAllAsRead(completion: (() -> Void)? = nil) {
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, markingRead: true, undoManager: undoManager, completion: completion) else {
|
||||
let markableArticles = Set(articles).subtracting(directlyMarkedAsUnreadArticles)
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: markableArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager,
|
||||
completion: completion) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
@@ -315,9 +326,8 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
// MARK: - Actions
|
||||
|
||||
@objc func openArticleInBrowser(_ sender: Any?) {
|
||||
if let link = oneSelectedArticle?.preferredLink {
|
||||
Browser.open(link, invertPreference: NSApp.currentEvent?.modifierFlags.contains(.shift) ?? false)
|
||||
}
|
||||
let urlStrings = selectedArticles.compactMap { $0.preferredLink }
|
||||
Browser.open(urlStrings, fromWindow: self.view.window, invertPreference: NSApp.currentEvent?.modifierFlags.contains(.shift) ?? false)
|
||||
}
|
||||
|
||||
@IBAction func toggleStatusOfSelectedArticles(_ sender: Any?) {
|
||||
@@ -337,14 +347,22 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
}
|
||||
|
||||
@IBAction func markSelectedArticlesAsRead(_ sender: Any?) {
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: selectedArticles, markingRead: true, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: selectedArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: true,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
}
|
||||
|
||||
@IBAction func markSelectedArticlesAsUnread(_ sender: Any?) {
|
||||
guard let undoManager = undoManager, let markUnreadCommand = MarkStatusCommand(initialArticles: selectedArticles, markingRead: false, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markUnreadCommand = MarkStatusCommand(initialArticles: selectedArticles,
|
||||
markingRead: false,
|
||||
directlyMarked: true,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markUnreadCommand)
|
||||
@@ -412,7 +430,11 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
return
|
||||
}
|
||||
|
||||
guard let undoManager = undoManager, let markStarredCommand = MarkStatusCommand(initialArticles: selectedArticles, markingRead: markingRead, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markStarredCommand = MarkStatusCommand(initialArticles: selectedArticles,
|
||||
markingRead: markingRead,
|
||||
directlyMarked: true,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -435,7 +457,11 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
return
|
||||
}
|
||||
|
||||
guard let undoManager = undoManager, let markStarredCommand = MarkStatusCommand(initialArticles: selectedArticles, markingStarred: starring, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markStarredCommand = MarkStatusCommand(initialArticles: selectedArticles,
|
||||
markingStarred: starring,
|
||||
directlyMarked: true,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markStarredCommand)
|
||||
@@ -502,7 +528,12 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
return
|
||||
}
|
||||
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articlesToMark, markingRead: true, undoManager: undoManager) else {
|
||||
let markableArticles = Set(articlesToMark).subtracting(directlyMarkedAsUnreadArticles)
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: markableArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
@@ -510,9 +541,16 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
|
||||
func markAboveArticlesRead(_ selectedArticles: [Article]) {
|
||||
guard let first = selectedArticles.first else { return }
|
||||
|
||||
let articlesToMark = articles.articlesAbove(article: first)
|
||||
guard !articlesToMark.isEmpty else { return }
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articlesToMark, markingRead: true, undoManager: undoManager) else {
|
||||
|
||||
let markableArticles = Set(articlesToMark).subtracting(directlyMarkedAsUnreadArticles)
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: markableArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
@@ -520,9 +558,16 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
|
||||
func markBelowArticlesRead(_ selectedArticles: [Article]) {
|
||||
guard let last = selectedArticles.last else { return }
|
||||
|
||||
let articlesToMark = articles.articlesBelow(article: last)
|
||||
guard !articlesToMark.isEmpty else { return }
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articlesToMark, markingRead: true, undoManager: undoManager) else {
|
||||
|
||||
let markableArticles = Set(articlesToMark).subtracting(directlyMarkedAsUnreadArticles)
|
||||
guard let undoManager = undoManager,
|
||||
let markReadCommand = MarkStatusCommand(initialArticles: markableArticles,
|
||||
markingRead: true,
|
||||
directlyMarked: false,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
@@ -666,6 +711,28 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
self.groupByFeed = AppDefaults.shared.timelineGroupByFeed
|
||||
}
|
||||
|
||||
@objc func markStatusCommandDidDirectMarking(_ note: Notification) {
|
||||
guard let userInfo = note.userInfo,
|
||||
let articles = userInfo[Account.UserInfoKey.articles] as? Set<Article>,
|
||||
let statusKey = userInfo[Account.UserInfoKey.statusKey] as? ArticleStatus.Key,
|
||||
let flag = userInfo[Account.UserInfoKey.statusFlag] as? Bool else { return }
|
||||
|
||||
if statusKey == .read && flag == false {
|
||||
directlyMarkedAsUnreadArticles.formUnion(articles)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func markStatusCommandDidUndoDirectMarking(_ note: Notification) {
|
||||
guard let userInfo = note.userInfo,
|
||||
let articles = userInfo[Account.UserInfoKey.articles] as? Set<Article>,
|
||||
let statusKey = userInfo[Account.UserInfoKey.statusKey] as? ArticleStatus.Key,
|
||||
let flag = userInfo[Account.UserInfoKey.statusFlag] as? Bool else { return }
|
||||
|
||||
if statusKey == .read && flag == false {
|
||||
directlyMarkedAsUnreadArticles.subtract(articles)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Reloading Data
|
||||
|
||||
private func cellForRowView(_ rowView: NSView) -> NSView? {
|
||||
@@ -779,8 +846,7 @@ extension TimelineViewController: NSUserInterfaceValidations {
|
||||
item.title = Browser.titleForOpenInBrowserInverted
|
||||
}
|
||||
|
||||
let currentLink = oneSelectedArticle?.preferredLink
|
||||
return currentLink != nil
|
||||
return selectedArticles.first { $0.preferredLink != nil } != nil
|
||||
}
|
||||
|
||||
if item.action == #selector(copy(_:)) {
|
||||
@@ -901,14 +967,22 @@ extension TimelineViewController: NSTableViewDelegate {
|
||||
}
|
||||
|
||||
private func toggleArticleRead(_ article: Article) {
|
||||
guard let undoManager = undoManager, let markUnreadCommand = MarkStatusCommand(initialArticles: [article], markingRead: !article.status.read, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markUnreadCommand = MarkStatusCommand(initialArticles: [article],
|
||||
markingRead: !article.status.read,
|
||||
directlyMarked: true,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
self.runCommand(markUnreadCommand)
|
||||
}
|
||||
|
||||
|
||||
private func toggleArticleStarred(_ article: Article) {
|
||||
guard let undoManager = undoManager, let markUnreadCommand = MarkStatusCommand(initialArticles: [article], markingStarred: !article.status.starred, undoManager: undoManager) else {
|
||||
guard let undoManager = undoManager,
|
||||
let markUnreadCommand = MarkStatusCommand(initialArticles: [article],
|
||||
markingStarred: !article.status.starred,
|
||||
directlyMarked: true,
|
||||
undoManager: undoManager) else {
|
||||
return
|
||||
}
|
||||
self.runCommand(markUnreadCommand)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// URLPasteboardWriter+NetNewsWire.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Nate Weaver on 2022-10-10.
|
||||
// Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import RSCore
|
||||
|
||||
extension URLPasteboardWriter {
|
||||
|
||||
/// Copy URL strings, alerting the user the first time the array of URL strings contains `nil`.
|
||||
/// - Parameters:
|
||||
/// - urlStrings: The URL strings to copy.
|
||||
/// - pasteboard: The pastebaord to copy to.
|
||||
/// - window: The window to use as a sheet parent for the alert. If `nil`, will run the alert modally.
|
||||
static func write(urlStrings: [String?], to pasteboard: NSPasteboard = .general, alertingIn window: NSWindow?) {
|
||||
URLPasteboardWriter.write(urlStrings: urlStrings.compactMap { $0 }, to: pasteboard)
|
||||
|
||||
if urlStrings.contains(nil), !AppDefaults.shared.hasSeenNotAllArticlesHaveURLsAlert {
|
||||
let alert = NSAlert()
|
||||
alert.messageText = NSLocalizedString("Some articles don’t have links, so they weren't copied.", comment: "\"Some articles have no links\" copy alert message text")
|
||||
alert.informativeText = NSLocalizedString("You won't see this message again.", comment: "You won't see this message again")
|
||||
|
||||
if let window {
|
||||
alert.beginSheetModal(for: window)
|
||||
} else {
|
||||
alert.runModal() // this should never happen
|
||||
}
|
||||
|
||||
AppDefaults.shared.hasSeenNotAllArticlesHaveURLsAlert = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ enum AccountsAddCloudKitWindowControllerError: LocalizedError {
|
||||
case iCloudDriveMissing
|
||||
|
||||
var errorDescription: String? {
|
||||
return NSLocalizedString("Unable to add iCloud Account. Please make sure you have iCloud and iCloud enabled in System Preferences.", comment: "Unable to add iCloud Account.")
|
||||
return NSLocalizedString("Unable to add iCloud Account. Please make sure you have iCloud and iCloud Drive enabled in System Preferences.", comment: "Unable to add iCloud Account.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ struct EnableExtensionPointView: View {
|
||||
|
||||
weak var parent: NSHostingController<EnableExtensionPointView>? // required because presentationMode.dismiss() doesn't work
|
||||
weak var enabler: ExtensionPointPreferencesEnabler?
|
||||
@State private var extensionPointTypeName = String(describing: Self.sendToCommandExtensionPointTypes.first)
|
||||
@State private var extensionPointTypeName = ""
|
||||
private var selectedType: ExtensionPoint.Type?
|
||||
|
||||
init(enabler: ExtensionPointPreferencesEnabler?, selectedType: ExtensionPoint.Type? ) {
|
||||
init(enabler: ExtensionPointPreferencesEnabler?, selectedType: ExtensionPoint.Type?) {
|
||||
self.enabler = enabler
|
||||
self.selectedType = selectedType
|
||||
}
|
||||
@@ -99,6 +99,11 @@ struct EnableExtensionPointView: View {
|
||||
.foregroundColor(.gray)
|
||||
.font(.caption)
|
||||
.padding(.horizontal)
|
||||
.onAppear {
|
||||
if extensionPointTypeName.count == 0 {
|
||||
self.extensionPointTypeName = extensionPointTypeNames.first!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +164,7 @@ struct EnableExtensionPointView: View {
|
||||
}
|
||||
|
||||
func disableContinue() -> Bool {
|
||||
ExtensionPointManager.shared.availableExtensionPointTypes.count == 0
|
||||
ExtensionPointManager.shared.availableExtensionPointTypes.count == 0 || extensionPointTypeName.count == 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-MacOS-512x512@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-MacOS-512x512@2x 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 682 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 682 KiB |
@@ -3,6 +3,9 @@
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"symbol-rendering-intent" : "template"
|
||||
},
|
||||
"symbols" : [
|
||||
{
|
||||
"filename" : "preferencesToolbarExtensions.svg",
|
||||
|
||||
+60
-128
@@ -1,161 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--Generator: Apple Native CoreSVG 149-->
|
||||
<!--Generator: Apple Native CoreSVG 175.5-->
|
||||
<!DOCTYPE svg
|
||||
PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="3300" height="2200">
|
||||
<!--glyph: "uni100AEE.medium", point size: 100.000000, font version: "Version 16.0d18e1", template writer version: "8"-->
|
||||
<!--glyph: "uni10096D.medium", point size: 100.0, font version: "18.0d12e2", template writer version: "101"-->
|
||||
<g id="Notes">
|
||||
<rect height="2200" id="artboard" style="fill:white;opacity:1" width="3300" x="0" y="0"/>
|
||||
<line id="" style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;font-weight:bold;" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 856.422 322)">Thin</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 1153.13 322)">Light</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 1746.56 322)">Medium</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 2043.27 322)">Semibold</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 2339.98 322)">Bold</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 2636.69 322)">Heavy</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>
|
||||
<line id="" style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1903" y2="1903"/>
|
||||
<g id="" transform="matrix(1 0 0 1 263 1933)">
|
||||
<path d="M9.24805 0.830078C13.5547 0.830078 17.1387-2.74414 17.1387-7.05078C17.1387-11.3574 13.5449-14.9316 9.23828-14.9316C4.94141-14.9316 1.36719-11.3574 1.36719-7.05078C1.36719-2.74414 4.95117 0.830078 9.24805 0.830078ZM9.24805-0.654297C5.70312-0.654297 2.87109-3.49609 2.87109-7.05078C2.87109-10.6055 5.69336-13.4473 9.23828-13.4473C12.793-13.4473 15.6348-10.6055 15.6445-7.05078C15.6543-3.49609 12.8027-0.654297 9.24805-0.654297ZM6.39648-6.31836L8.50586-6.31836L8.50586-4.19922C8.50586-3.75977 8.79883-3.45703 9.22852-3.45703C9.67773-3.45703 9.9707-3.75977 9.9707-4.19922L9.9707-6.31836L12.0996-6.31836C12.5391-6.31836 12.8418-6.61133 12.8418-7.04102C12.8418-7.48047 12.5391-7.7832 12.0996-7.7832L9.9707-7.7832L9.9707-9.89258C9.9707-10.3418 9.67773-10.6445 9.22852-10.6445C8.79883-10.6445 8.50586-10.3418 8.50586-9.89258L8.50586-7.7832L6.39648-7.7832C5.94727-7.7832 5.64453-7.48047 5.64453-7.04102C5.64453-6.61133 5.94727-6.31836 6.39648-6.31836Z"/>
|
||||
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 856.422 322)">Thin</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1153.13 322)">Light</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1746.56 322)">Medium</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2043.27 322)">Semibold</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2339.98 322)">Bold</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2636.69 322)">Heavy</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>
|
||||
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1903" y2="1903"/>
|
||||
<g transform="matrix(1 0 0 1 263 1933)">
|
||||
<path d="M9.24805 0.830078C13.5547 0.830078 17.1387-2.74414 17.1387-7.05078C17.1387-11.3574 13.5449-14.9316 9.23828-14.9316C4.94141-14.9316 1.36719-11.3574 1.36719-7.05078C1.36719-2.74414 4.95117 0.830078 9.24805 0.830078ZM9.24805-0.654297C5.70312-0.654297 2.87109-3.49609 2.87109-7.05078C2.87109-10.6055 5.69336-13.4473 9.23828-13.4473C12.793-13.4473 15.6445-10.6055 15.6445-7.05078C15.6445-3.49609 12.8027-0.654297 9.24805-0.654297ZM5.6543-7.05078C5.6543-6.62109 5.95703-6.32812 6.40625-6.32812L8.50586-6.32812L8.50586-4.20898C8.50586-3.76953 8.79883-3.4668 9.22852-3.4668C9.67773-3.4668 9.9707-3.76953 9.9707-4.20898L9.9707-6.32812L12.0898-6.32812C12.5293-6.32812 12.832-6.62109 12.832-7.05078C12.832-7.49023 12.5293-7.79297 12.0898-7.79297L9.9707-7.79297L9.9707-9.90234C9.9707-10.3516 9.67773-10.6543 9.22852-10.6543C8.79883-10.6543 8.50586-10.3516 8.50586-9.90234L8.50586-7.79297L6.40625-7.79297C5.95703-7.79297 5.6543-7.49023 5.6543-7.05078Z"/>
|
||||
</g>
|
||||
<g id="" transform="matrix(1 0 0 1 281.506 1933)">
|
||||
<path d="M11.709 2.91016C17.1582 2.91016 21.6699-1.61133 21.6699-7.05078C21.6699-12.5 17.1484-17.0117 11.6992-17.0117C6.25977-17.0117 1.74805-12.5 1.74805-7.05078C1.74805-1.61133 6.26953 2.91016 11.709 2.91016ZM11.709 1.25C7.09961 1.25 3.41797-2.44141 3.41797-7.05078C3.41797-11.6602 7.08984-15.3516 11.6992-15.3516C16.3086-15.3516 20-11.6602 20.0098-7.05078C20.0195-2.44141 16.3184 1.25 11.709 1.25ZM7.98828-6.23047L10.8789-6.23047L10.8789-3.32031C10.8789-2.83203 11.2109-2.5 11.6895-2.5C12.1777-2.5 12.5195-2.83203 12.5195-3.32031L12.5195-6.23047L15.4297-6.23047C15.918-6.23047 16.25-6.5625 16.25-7.04102C16.25-7.5293 15.918-7.87109 15.4297-7.87109L12.5195-7.87109L12.5195-10.7617C12.5195-11.2695 12.1777-11.6016 11.6895-11.6016C11.2109-11.6016 10.8789-11.2598 10.8789-10.7617L10.8789-7.87109L7.98828-7.87109C7.48047-7.87109 7.14844-7.5293 7.14844-7.04102C7.14844-6.5625 7.49023-6.23047 7.98828-6.23047Z"/>
|
||||
<g transform="matrix(1 0 0 1 281.867 1933)">
|
||||
<path d="M11.709 2.91016C17.1582 2.91016 21.6699-1.61133 21.6699-7.05078C21.6699-12.5 17.1484-17.0117 11.6992-17.0117C6.25977-17.0117 1.74805-12.5 1.74805-7.05078C1.74805-1.61133 6.26953 2.91016 11.709 2.91016ZM11.709 1.25C7.09961 1.25 3.41797-2.44141 3.41797-7.05078C3.41797-11.6602 7.08984-15.3516 11.6992-15.3516C16.3086-15.3516 20.0098-11.6602 20.0098-7.05078C20.0098-2.44141 16.3184 1.25 11.709 1.25ZM7.17773-7.05078C7.17773-6.57227 7.50977-6.25 8.00781-6.25L10.8789-6.25L10.8789-3.36914C10.8789-2.88086 11.2109-2.53906 11.6895-2.53906C12.1777-2.53906 12.5195-2.87109 12.5195-3.36914L12.5195-6.25L15.4004-6.25C15.8887-6.25 16.2305-6.57227 16.2305-7.05078C16.2305-7.53906 15.8887-7.88086 15.4004-7.88086L12.5195-7.88086L12.5195-10.752C12.5195-11.25 12.1777-11.5918 11.6895-11.5918C11.2109-11.5918 10.8789-11.25 10.8789-10.752L10.8789-7.88086L8.00781-7.88086C7.50977-7.88086 7.17773-7.53906 7.17773-7.05078Z"/>
|
||||
</g>
|
||||
<g id="" transform="matrix(1 0 0 1 304.924 1933)">
|
||||
<path d="M14.9707 5.66406C21.9336 5.66406 27.6953-0.0976562 27.6953-7.05078C27.6953-14.0137 21.9238-19.7754 14.9609-19.7754C8.00781-19.7754 2.25586-14.0137 2.25586-7.05078C2.25586-0.0976562 8.01758 5.66406 14.9707 5.66406ZM14.9707 3.84766C8.93555 3.84766 4.08203-1.01562 4.08203-7.05078C4.08203-13.0957 8.92578-17.9492 14.9609-17.9492C21.0059-17.9492 25.8594-13.0957 25.8691-7.05078C25.8789-1.01562 21.0156 3.84766 14.9707 3.84766ZM10.0586-6.14258L14.0625-6.14258L14.0625-2.12891C14.0625-1.5918 14.4336-1.2207 14.9512-1.2207C15.4883-1.2207 15.8594-1.5918 15.8594-2.12891L15.8594-6.14258L19.8828-6.14258C20.4102-6.14258 20.791-6.51367 20.791-7.03125C20.791-7.56836 20.4199-7.94922 19.8828-7.94922L15.8594-7.94922L15.8594-11.9531C15.8594-12.5098 15.4883-12.8809 14.9512-12.8809C14.4336-12.8809 14.0625-12.5 14.0625-11.9531L14.0625-7.94922L10.0586-7.94922C9.50195-7.94922 9.13086-7.56836 9.13086-7.03125C9.13086-6.51367 9.51172-6.14258 10.0586-6.14258Z"/>
|
||||
<g transform="matrix(1 0 0 1 305.646 1933)">
|
||||
<path d="M14.9707 5.66406C21.9336 5.66406 27.6953-0.0976562 27.6953-7.05078C27.6953-14.0137 21.9238-19.7754 14.9609-19.7754C8.00781-19.7754 2.25586-14.0137 2.25586-7.05078C2.25586-0.0976562 8.01758 5.66406 14.9707 5.66406ZM14.9707 3.84766C8.93555 3.84766 4.08203-1.01562 4.08203-7.05078C4.08203-13.0957 8.92578-17.9492 14.9609-17.9492C21.0059-17.9492 25.8691-13.0957 25.8691-7.05078C25.8691-1.01562 21.0156 3.84766 14.9707 3.84766ZM9.19922-7.05078C9.19922-6.5332 9.57031-6.17188 10.1172-6.17188L14.0625-6.17188L14.0625-2.2168C14.0625-1.67969 14.4336-1.29883 14.9512-1.29883C15.4883-1.29883 15.8594-1.66992 15.8594-2.2168L15.8594-6.17188L19.8145-6.17188C20.3516-6.17188 20.7324-6.5332 20.7324-7.05078C20.7324-7.59766 20.3613-7.96875 19.8145-7.96875L15.8594-7.96875L15.8594-11.9141C15.8594-12.4609 15.4883-12.8418 14.9512-12.8418C14.4336-12.8418 14.0625-12.4609 14.0625-11.9141L14.0625-7.96875L10.1172-7.96875C9.57031-7.96875 9.19922-7.59766 9.19922-7.05078Z"/>
|
||||
</g>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;font-weight:bold;" transform="matrix(1 0 0 1 263 1953)">Design Variations</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 263 1971)">Symbols are supported in up to nine weights and three scales.</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 263 1989)">For optimal layout with text and other symbols, vertically align</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 263 2007)">symbols with the adjacent text.</text>
|
||||
<line id="" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="776" x2="776" y1="1919" y2="1933"/>
|
||||
<g id="" transform="matrix(1 0 0 1 776 1933)">
|
||||
<path d="M3.31055 0.126953C3.82812 0.126953 4.08203-0.0683594 4.26758-0.605469L5.52734-4.0625L11.2891-4.0625L12.5488-0.605469C12.7344-0.0683594 12.9883 0.126953 13.4961 0.126953C14.0137 0.126953 14.3457-0.185547 14.3457-0.673828C14.3457-0.839844 14.3164-0.986328 14.2383-1.20117L9.6582-13.3887C9.43359-13.9941 9.0332-14.2871 8.4082-14.2871C7.80273-14.2871 7.39258-13.9941 7.17773-13.3984L2.59766-1.19141C2.51953-0.976562 2.49023-0.830078 2.49023-0.664062C2.49023-0.175781 2.80273 0.126953 3.31055 0.126953ZM6.00586-5.53711L8.37891-12.1094L8.42773-12.1094L10.8008-5.53711Z"/>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 1953)">Design Variations</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1971)">Symbols are supported in up to nine weights and three scales.</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1989)">For optimal layout with text and other symbols, vertically align</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 2007)">symbols with the adjacent text.</text>
|
||||
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="776" x2="776" y1="1919" y2="1933"/>
|
||||
<g transform="matrix(1 0 0 1 776 1933)">
|
||||
<path d="M3.31055 0.15625C3.82812 0.15625 4.08203-0.0390625 4.26758-0.585938L5.52734-4.0332L11.2891-4.0332L12.5488-0.585938C12.7344-0.0390625 12.9883 0.15625 13.4961 0.15625C14.0137 0.15625 14.3457-0.15625 14.3457-0.644531C14.3457-0.810547 14.3164-0.966797 14.2383-1.17188L9.6582-13.3691C9.43359-13.9648 9.0332-14.2676 8.4082-14.2676C7.80273-14.2676 7.39258-13.9746 7.17773-13.3789L2.59766-1.16211C2.51953-0.957031 2.49023-0.800781 2.49023-0.634766C2.49023-0.146484 2.80273 0.15625 3.31055 0.15625ZM6.00586-5.51758L8.37891-12.0898L8.42773-12.0898L10.8008-5.51758Z"/>
|
||||
</g>
|
||||
<line id="" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="792.836" x2="792.836" y1="1919" y2="1933"/>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;font-weight:bold;" transform="matrix(1 0 0 1 776 1953)">Margins</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 776 1971)">Leading and trailing margins on the left and right side of each symbol</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 776 1989)">can be adjusted by modifying the x-location of the margin guidelines.</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 776 2007)">Modifications are automatically applied proportionally to all</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 776 2025)">scales and weights.</text>
|
||||
<g id="" transform="matrix(1 0 0 1 1289 1933)">
|
||||
<path d="M2.8418 1.86523L4.54102 3.57422C5.40039 4.44336 6.38672 4.38477 7.31445 3.35938L17.4902-7.85156C17.7539-7.76367 18.0273-7.7832 18.3398-7.8418L19.4043-8.03711L20.0684-7.36328L20.0293-6.80664C19.9902-6.30859 20.1172-5.92773 20.6055-5.44922L21.3672-4.70703C21.8457-4.22852 22.4609-4.19922 22.9297-4.66797L25.8398-7.58789C26.3086-8.05664 26.2891-8.65234 25.8105-9.13086L25.0391-9.89258C24.5605-10.3711 24.1895-10.5273 23.7109-10.4883L23.1348-10.4395L22.4902-11.0742L22.7344-12.1973C22.8613-12.7637 22.7051-13.2031 22.1191-13.7891L19.9219-15.9766C16.582-19.2969 12.1484-19.2188 9.25781-16.3281C8.83789-15.918 8.80859-15.3418 9.04297-14.9512C9.27734-14.5898 9.73633-14.3555 10.3809-14.5215C11.8457-14.8633 13.3691-14.9219 14.7949-13.9844L14.209-12.5293C14.0137-12.0508 13.9844-11.6504 14.1113-11.2891L3.04688-0.898438C2.06055 0.0195312 1.98242 0.996094 2.8418 1.86523ZM10.752-15.957C13.1836-17.7344 16.4746-17.4316 18.7012-15.2051L21.1328-12.793C21.3672-12.5586 21.4062-12.373 21.3379-12.0312L21.0156-10.5469L22.5195-9.0625L23.5059-9.12109C23.7598-9.13086 23.8379-9.11133 24.0332-8.91602L24.6094-8.33984L22.168-5.89844L21.5918-6.47461C21.3965-6.66992 21.3672-6.74805 21.377-7.01172L21.4453-7.98828L19.9512-9.47266L18.4277-9.21875C18.1055-9.15039 17.959-9.17969 17.7148-9.41406L15.7129-11.416C15.459-11.6504 15.4297-11.8164 15.5859-12.1875L16.4648-14.2773C14.9023-15.7324 12.8711-16.3574 10.8398-15.7617C10.6836-15.7227 10.625-15.8496 10.752-15.957ZM5.27344 2.30469L4.10156 1.14258C3.63281 0.683594 3.74023 0.341797 4.14062-0.0195312L14.9512-10.1953L16.416-8.71094L6.42578 2.27539C6.07422 2.67578 5.74219 2.77344 5.27344 2.30469Z"/>
|
||||
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="793.197" x2="793.197" y1="1919" y2="1933"/>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 776 1953)">Margins</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1971)">Leading and trailing margins on the left and right side of each symbol</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1989)">can be adjusted by modifying the x-location of the margin guidelines.</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2007)">Modifications are automatically applied proportionally to all</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2025)">scales and weights.</text>
|
||||
<g transform="matrix(1 0 0 1 1289 1933)">
|
||||
<path d="M2.8418 1.86523L4.54102 3.57422C5.40039 4.44336 6.38672 4.38477 7.31445 3.35938L18.0078-8.42773L17.041-9.4043L6.42578 2.27539C6.07422 2.67578 5.74219 2.77344 5.27344 2.30469L4.10156 1.14258C3.63281 0.683594 3.74023 0.341797 4.14062-0.0195312L15.6152-10.8203L14.6387-11.7871L3.04688-0.898438C2.06055 0.0195312 1.98242 0.996094 2.8418 1.86523ZM9.25781-16.3281C8.83789-15.918 8.80859-15.3418 9.04297-14.9512C9.27734-14.5898 9.73633-14.3555 10.3809-14.5215C11.8457-14.8633 13.3691-14.9219 14.7949-13.9844L14.209-12.5293C13.8672-11.6992 14.043-11.1133 14.5801-10.5664L16.875-8.25195C17.3633-7.76367 17.7734-7.74414 18.3398-7.8418L19.4043-8.03711L20.0684-7.36328L20.0293-6.80664C19.9902-6.30859 20.1172-5.92773 20.6055-5.44922L21.3672-4.70703C21.8457-4.22852 22.4609-4.19922 22.9297-4.66797L25.8398-7.58789C26.3086-8.05664 26.2891-8.65234 25.8105-9.13086L25.0391-9.89258C24.5605-10.3711 24.1895-10.5273 23.7109-10.4883L23.1348-10.4395L22.4902-11.0742L22.7344-12.1973C22.8613-12.7637 22.7051-13.2031 22.1191-13.7891L19.9219-15.9766C16.582-19.2969 12.1484-19.2188 9.25781-16.3281ZM10.752-15.957C13.1836-17.7344 16.4746-17.4316 18.7012-15.2051L21.1328-12.793C21.3672-12.5586 21.4062-12.373 21.3379-12.0312L21.0156-10.5469L22.5195-9.0625L23.5059-9.12109C23.7598-9.13086 23.8379-9.11133 24.0332-8.91602L24.6094-8.33984L22.168-5.89844L21.5918-6.47461C21.3965-6.66992 21.3672-6.74805 21.377-7.01172L21.4453-7.98828L19.9512-9.47266L18.4277-9.21875C18.1055-9.15039 17.959-9.17969 17.7148-9.41406L15.7129-11.416C15.459-11.6504 15.4297-11.8164 15.5859-12.1875L16.4648-14.2773C14.9023-15.7324 12.8711-16.3574 10.8398-15.7617C10.6836-15.7227 10.625-15.8496 10.752-15.957Z"/>
|
||||
</g>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;font-weight:bold;" transform="matrix(1 0 0 1 1289 1953)">Exporting</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 1289 1971)">Symbols should be outlined when exporting to ensure the</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 1289 1989)">design is preserved when submitting to Xcode.</text>
|
||||
<text id="template-version" style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.2.0</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 12 or greater</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from bolt.fill.batteryblock</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100 points</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 263 726)">Small</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 263 1156)">Medium</text>
|
||||
<text style="stroke:none;fill:black;font-family:-apple-system,"SF Pro Display","SF Pro Text",Helvetica,sans-serif;" transform="matrix(1 0 0 1 263 1586)">Large</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 1289 1953)">Exporting</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1971)">Symbols should be outlined when exporting to ensure the</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1989)">design is preserved when submitting to Xcode.</text>
|
||||
<text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.3.0</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 13 or greater</text>
|
||||
<text id="descriptive-name" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from puzzlepiece.extension</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100 points</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 726)">Small</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1156)">Medium</text>
|
||||
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1586)">Large</text>
|
||||
</g>
|
||||
<g id="Guides">
|
||||
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 696)">
|
||||
<path d="M0.976562 0L3.66211 0L12.9883-24.4629L45.752-24.4629L55.127 0L57.7637 0L30.6152-70.459L28.125-70.459ZM29.3457-67.1387L29.4434-67.1387L44.873-26.709L13.8672-26.709Z"/>
|
||||
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
|
||||
</g>
|
||||
<line id="Baseline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="696" y2="696"/>
|
||||
<line id="Capline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="625.541" y2="625.541"/>
|
||||
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1126)">
|
||||
<path d="M0.976562 0L3.66211 0L12.9883-24.4629L45.752-24.4629L55.127 0L57.7637 0L30.6152-70.459L28.125-70.459ZM29.3457-67.1387L29.4434-67.1387L44.873-26.709L13.8672-26.709Z"/>
|
||||
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
|
||||
</g>
|
||||
<line id="Baseline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1126" y2="1126"/>
|
||||
<line id="Capline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1055.54" y2="1055.54"/>
|
||||
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1556)">
|
||||
<path d="M0.976562 0L3.66211 0L12.9883-24.4629L45.752-24.4629L55.127 0L57.7637 0L30.6152-70.459L28.125-70.459ZM29.3457-67.1387L29.4434-67.1387L44.873-26.709L13.8672-26.709Z"/>
|
||||
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
|
||||
</g>
|
||||
<line id="Baseline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1556" y2="1556"/>
|
||||
<line id="Capline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1485.54" y2="1485.54"/>
|
||||
<line id="left-margin" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1379.82" x2="1379.82" y1="1030.79" y2="1150.12"/>
|
||||
<line id="right-margin" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1519.86" x2="1519.86" y1="1030.79" y2="1150.12"/>
|
||||
<line id="left-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="506.104" x2="506.104" y1="600.785" y2="720.121"/>
|
||||
<line id="right-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="613.318" x2="613.318" y1="600.785" y2="720.121"/>
|
||||
<line id="left-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1394.38" x2="1394.38" y1="600.785" y2="720.121"/>
|
||||
<line id="right-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1505.31" x2="1505.31" y1="600.785" y2="720.121"/>
|
||||
<line id="left-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2875.37" x2="2875.37" y1="600.785" y2="720.121"/>
|
||||
<line id="right-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2991.43" x2="2991.43" y1="600.785" y2="720.121"/>
|
||||
</g>
|
||||
<g id="Symbols">
|
||||
<g id="Black-L" transform="matrix(1 0 0 1 2841.51 1556)">
|
||||
<path d="M39.9902 26.5137L143.799 26.5137C159.082 26.5137 167.725 17.8711 167.725 2.68555L167.725-55.2246C167.725-70.459 159.082-79.0527 143.799-79.0527L138.086-79.0527L138.086-85.2051C138.086-92.5781 133.838-96.875 126.514-96.875L112.354-96.875C105.078-96.875 100.781-92.5781 100.781-85.2051L100.781-79.0527L82.9102-79.0527L82.9102-85.2051C82.9102-92.5781 78.6621-96.875 71.3867-96.875L57.1777-96.875C49.9023-96.875 45.6543-92.5781 45.6543-85.2051L45.6543-79.0527L39.9902-79.0527C24.7559-79.0527 16.0645-70.459 16.0645-55.2246L16.0645 2.68555C16.0645 17.8711 24.7559 26.5137 39.9902 26.5137ZM42.6758 6.29883C38.4766 6.29883 36.3281 4.39453 36.3281-0.146484L36.3281-52.3926C36.3281-56.9336 38.4766-58.8379 42.6758-58.8379L141.064-58.8379C145.312-58.8379 147.461-56.9336 147.461-52.3926L147.461-0.146484C147.461 4.39453 145.312 6.29883 141.064 6.29883Z"/>
|
||||
<g id="Black-S" transform="matrix(1 0 0 1 2875.37 696)">
|
||||
<path d="M9.76562-9.17969C9.76562-0.878906 15.3809 4.6875 23.8281 4.6875L71.9727 4.6875C80.4199 4.6875 86.0352-0.878906 86.0352-9.17969L86.0352-18.5547C86.0352-19.2383 86.5234-19.4336 87.3047-19.0918C88.7207-18.457 90.5762-18.2129 92.7734-18.2129C101.074-18.2129 109.229-24.4629 109.229-35.3027C109.229-46.1426 101.074-52.3926 92.7734-52.3926C90.5762-52.3926 88.7207-52.1484 87.3047-51.5137C86.5234-51.1719 86.0352-51.3672 86.0352-52.0508L86.0352-61.4258C86.0352-69.7266 80.4199-75.293 71.9727-75.293L23.8281-75.293C15.3809-75.293 9.76562-69.7266 9.76562-61.4258L9.76562-44.8242C9.76562-40.1367 13.0371-36.6699 17.4316-36.6699C20.1172-36.6699 21.7285-37.5977 23.1934-38.5254C24.707-39.502 26.0254-40.4785 28.0762-40.4785C31.1523-40.4785 33.2031-38.4277 33.2031-35.3027C33.2031-32.1777 31.1523-30.127 28.0762-30.127C26.0254-30.127 24.707-31.1035 23.1934-32.0801C21.7285-33.0078 20.1172-33.9355 17.4316-33.9355C13.0371-33.9355 9.76562-30.4688 9.76562-25.7812ZM21.9727-9.57031L21.9727-18.5547C21.9727-19.2383 22.4609-19.4336 23.2422-19.0918C24.6582-18.457 26.5137-18.2129 28.7109-18.2129C37.0117-18.2129 45.166-24.4629 45.166-35.3027C45.166-46.1426 37.0117-52.3926 28.7109-52.3926C26.5137-52.3926 24.6582-52.1484 23.2422-51.5137C22.4609-51.1719 21.9727-51.3672 21.9727-52.0508L21.9727-61.0352C21.9727-62.2559 22.7539-63.0859 23.9258-63.0859L71.875-63.0859C73.0469-63.0859 73.8281-62.2559 73.8281-61.0352L73.8281-44.8242C73.8281-40.1367 77.0996-36.6699 81.4941-36.6699C84.1797-36.6699 85.791-37.5977 87.2559-38.5254C88.7695-39.502 90.0879-40.4785 92.1387-40.4785C95.2148-40.4785 97.2656-38.4277 97.2656-35.3027C97.2656-32.1777 95.2148-30.127 92.1387-30.127C90.0879-30.127 88.7695-31.1035 87.2559-32.0801C85.791-33.0078 84.1797-33.9355 81.4941-33.9355C77.0996-33.9355 73.8281-30.4688 73.8281-25.7812L73.8281-9.57031C73.8281-8.34961 73.0469-7.51953 71.875-7.51953L23.9258-7.51953C22.7539-7.51953 21.9727-8.34961 21.9727-9.57031Z"/>
|
||||
</g>
|
||||
<g id="Heavy-L" transform="matrix(1 0 0 1 2545.23 1556)">
|
||||
<path d="M38.8184 25.4883L144.092 25.4883C158.74 25.4883 166.846 17.4316 166.846 2.88086L166.846-55.8105C166.846-70.3613 158.74-78.4668 144.092-78.4668L137.793-78.4668L137.793-85.2051C137.793-91.8945 133.936-95.8496 127.246-95.8496L111.865-95.8496C105.225-95.8496 101.318-91.8945 101.318-85.2051L101.318-78.4668L81.4941-78.4668L81.4941-85.2051C81.4941-91.8945 77.6367-95.8496 70.9473-95.8496L55.5664-95.8496C48.9258-95.8496 45.0195-91.8945 45.0195-85.2051L45.0195-78.4668L38.8184-78.4668C24.2188-78.4668 16.0645-70.3613 16.0645-55.8105L16.0645 2.88086C16.0645 17.4316 24.2188 25.4883 38.8184 25.4883ZM40.918 8.00781C36.084 8.00781 33.5938 5.71289 33.5938 0.585938L33.5938-53.5156C33.5938-58.6426 36.084-60.9375 40.918-60.9375L141.943-60.9375C146.777-60.9375 149.316-58.6426 149.316-53.5156L149.316 0.585938C149.316 5.71289 146.777 8.00781 141.943 8.00781Z"/>
|
||||
<g id="Regular-S" transform="matrix(1 0 0 1 1394.38 696)">
|
||||
<path d="M9.76562-10.0586C9.76562-1.95312 13.916 2.09961 22.168 2.09961L68.5059 2.09961C76.709 2.09961 80.8594-1.95312 80.8594-10.0586L80.8594-22.9492C80.8594-23.4375 81.2012-23.6816 81.7871-23.2422C84.2773-21.5332 87.207-20.5078 89.9414-20.5078C97.2168-20.5078 104.102-26.5137 104.102-35.2539C104.102-44.043 97.2168-50 89.9414-50C87.207-50 84.2773-49.0234 81.7871-47.2656C81.2012-46.875 80.8594-47.0703 80.8594-47.6074L80.8594-60.5469C80.8594-68.6523 76.709-72.7051 68.5059-72.7051L22.168-72.7051C13.916-72.7051 9.76562-68.6523 9.76562-60.5469L9.76562-43.7988C9.76562-40.3809 12.0605-38.2324 14.8926-38.2324C16.4551-38.2324 18.1152-38.916 19.6777-40.3809C21.4355-41.9922 23.5352-43.0176 25.5371-43.0176C29.5898-43.0176 33.2031-39.9414 33.2031-35.2539C33.2031-30.5664 29.5898-27.4902 25.5371-27.4902C23.5352-27.4902 21.4355-28.5156 19.6777-30.127C18.1152-31.5918 16.4551-32.2754 14.8926-32.2754C12.0605-32.2754 9.76562-30.127 9.76562-26.709ZM16.7969-10.4492L16.7969-22.168C16.7969-24.1211 17.7246-23.2422 18.4082-22.8516C20.7031-21.3867 23.3398-20.5078 25.8789-20.5078C33.1543-20.5078 39.9902-26.5137 39.9902-35.2539C39.9902-43.9941 33.1543-50 25.8789-50C23.3398-50 20.7031-49.1211 18.4082-47.6562C17.7246-47.2656 16.7969-46.3867 16.7969-48.3398L16.7969-60.1562C16.7969-63.7695 18.7988-65.6738 22.2656-65.6738L68.4082-65.6738C71.8262-65.6738 73.8281-63.7695 73.8281-60.1562L73.8281-43.8477C73.8281-40.4297 76.123-38.2324 78.9551-38.2324C80.5176-38.2324 82.1777-38.916 83.7402-40.3809C85.498-42.041 87.5977-43.0176 89.5996-43.0176C93.6523-43.0176 97.2656-39.9414 97.2656-35.2539C97.2656-30.6152 93.6523-27.4902 89.5996-27.4902C87.5977-27.4902 85.498-28.5156 83.7402-30.127C82.1777-31.5918 80.5176-32.2754 78.9551-32.2754C76.123-32.2754 73.8281-30.127 73.8281-26.709L73.8281-10.4492C73.8281-6.83594 71.8262-4.93164 68.4082-4.93164L22.2656-4.93164C18.7988-4.93164 16.7969-6.83594 16.7969-10.4492Z"/>
|
||||
</g>
|
||||
<g id="Bold-L" transform="matrix(1 0 0 1 2249.01 1556)">
|
||||
<path d="M37.5 24.3652L144.385 24.3652C158.35 24.3652 165.869 16.8945 165.869 3.07617L165.869-56.4453C165.869-70.2637 158.35-77.7832 144.385-77.7832L137.5-77.7832L137.5-85.2539C137.5-91.2109 134.033-94.7266 128.076-94.7266L111.377-94.7266C105.371-94.7266 101.953-91.2109 101.953-85.2539L101.953-77.7832L79.8828-77.7832L79.8828-85.2539C79.8828-91.2109 76.4648-94.7266 70.459-94.7266L53.7598-94.7266C47.8027-94.7266 44.3359-91.2109 44.3359-85.2539L44.3359-77.7832L37.5-77.7832C23.6328-77.7832 16.0645-70.3125 16.0645-56.4453L16.0645 3.07617C16.0645 16.8945 23.6328 24.3652 37.5 24.3652ZM38.9648 9.91211C33.4473 9.91211 30.5176 7.17773 30.5176 1.41602L30.5176-54.7852C30.5176-60.5469 33.4473-63.3301 38.9648-63.3301L142.969-63.3301C148.389-63.3301 151.416-60.5469 151.416-54.7852L151.416 1.41602C151.416 7.17773 148.389 9.91211 142.969 9.91211Z"/>
|
||||
</g>
|
||||
<g id="Semibold-L" transform="matrix(1 0 0 1 1952.64 1556)">
|
||||
<path d="M36.6211 23.584L144.629 23.584C158.057 23.584 165.186 16.5039 165.186 3.17383L165.186-56.8848C165.186-70.2148 158.057-77.2949 144.629-77.2949L137.256-77.2949L137.256-85.2539C137.256-90.7227 134.131-93.9453 128.662-93.9453L110.986-93.9453C105.518-93.9453 102.393-90.7227 102.393-85.2539L102.393-77.2949L78.7598-77.2949L78.7598-85.2539C78.7598-90.7227 75.6348-93.9453 70.166-93.9453L52.5391-93.9453C47.0215-93.9453 43.8965-90.7227 43.8965-85.2539L43.8965-77.2949L36.6211-77.2949C23.1934-77.2949 16.0645-70.2148 16.0645-56.8848L16.0645 3.17383C16.0645 16.5527 23.1934 23.584 36.6211 23.584ZM37.5977 11.2793C31.6406 11.2793 28.418 8.20312 28.418 1.95312L28.418-55.6641C28.418-61.8652 31.6406-64.9414 37.5977-64.9414L143.652-64.9414C149.512-64.9414 152.832-61.8652 152.832-55.6641L152.832 1.95312C152.832 8.20312 149.512 11.2793 143.652 11.2793Z"/>
|
||||
</g>
|
||||
<g id="Medium-L" transform="matrix(1 0 0 1 1656.2 1556)">
|
||||
<path d="M35.9375 22.998L144.775 22.998C157.861 22.998 164.648 16.2109 164.648 3.27148L164.648-57.2266C164.648-70.166 157.861-76.9531 144.775-76.9531L137.109-76.9531L137.109-85.2539C137.109-90.332 134.18-93.3105 129.053-93.3105L110.742-93.3105C105.615-93.3105 102.686-90.332 102.686-85.2539L102.686-76.9531L77.9297-76.9531L77.9297-85.2539C77.9297-90.332 75.0488-93.3105 69.9219-93.3105L51.5625-93.3105C46.4355-93.3105 43.5547-90.332 43.5547-85.2539L43.5547-76.9531L35.9375-76.9531C22.9004-76.9531 16.0645-70.2148 16.0645-57.2266L16.0645 3.27148C16.0645 16.2598 22.9004 22.998 35.9375 22.998ZM36.5723 12.2559C30.2246 12.2559 26.8066 8.98438 26.8066 2.39258L26.8066-56.3477C26.8066-62.8906 30.2246-66.2109 36.5723-66.2109L144.141-66.2109C150.391-66.2109 153.906-62.8906 153.906-56.3477L153.906 2.39258C153.906 8.98438 150.391 12.2559 144.141 12.2559Z"/>
|
||||
</g>
|
||||
<g id="Regular-L" transform="matrix(1 0 0 1 1359.81 1556)">
|
||||
<path d="M35.0586 22.2168L144.971 22.2168C157.617 22.2168 164.014 15.8691 164.014 3.41797L164.014-57.666C164.014-70.0684 157.617-76.4648 144.971-76.4648L136.914-76.4648L136.914-85.2539C136.914-89.8438 134.277-92.5293 129.639-92.5293L110.4-92.5293C105.713-92.5293 103.125-89.8438 103.125-85.2539L103.125-76.4648L76.8555-76.4648L76.8555-85.2539C76.8555-89.8438 74.2188-92.5293 69.5801-92.5293L50.3418-92.5293C45.6543-92.5293 43.0664-89.8438 43.0664-85.2539L43.0664-76.4648L35.0586-76.4648C22.4609-76.4648 16.0645-70.166 16.0645-57.666L16.0645 3.41797C16.0645 15.918 22.4609 22.2168 35.0586 22.2168ZM35.2539 13.5742C28.418 13.5742 24.707 9.96094 24.707 2.97852L24.707-57.1777C24.707-64.209 28.418-67.8223 35.2539-67.8223L144.824-67.8223C151.514-67.8223 155.322-64.209 155.322-57.1777L155.322 2.97852C155.322 9.96094 151.514 13.5742 144.824 13.5742Z"/>
|
||||
</g>
|
||||
<g id="Light-L" transform="matrix(1 0 0 1 1063.56 1556)">
|
||||
<path d="M34.0332 21.4355L145.117 21.4355C157.031 21.4355 163.086 15.2344 163.086 3.56445L163.086-57.7637C163.086-69.4336 157.031-75.6348 145.117-75.6348L137.061-75.6348L137.061-84.9609C137.061-89.209 134.668-91.6992 130.273-91.6992L110.107-91.6992C105.664-91.6992 103.271-89.209 103.271-84.9609L103.271-75.6348L75.8301-75.6348L75.8301-84.9609C75.8301-89.209 73.4375-91.6992 69.043-91.6992L48.877-91.6992C44.4336-91.6992 42.041-89.209 42.041-84.9609L42.041-75.6348L34.0332-75.6348C22.168-75.6348 16.0645-69.5312 16.0645-57.7637L16.0645 3.56445C16.0645 15.3809 22.168 21.4355 34.0332 21.4355ZM34.1797 14.7949C26.709 14.7949 22.7051 10.8398 22.7051 3.22266L22.7051-57.4219C22.7051-65.0391 26.709-68.9941 34.1797-68.9941L144.971-68.9941C152.295-68.9941 156.494-65.0391 156.494-57.4219L156.494 3.22266C156.494 10.8398 152.295 14.7949 144.971 14.7949Z"/>
|
||||
</g>
|
||||
<g id="Thin-L" transform="matrix(1 0 0 1 767.433 1556)">
|
||||
<path d="M32.666 20.3613L145.312 20.3613C156.201 20.3613 161.914 14.4531 161.914 3.75977L161.914-57.9102C161.914-68.6035 156.201-74.5117 145.312-74.5117L137.256-74.5117L137.256-84.5703C137.256-88.3301 135.205-90.5762 131.104-90.5762L109.717-90.5762C105.615-90.5762 103.516-88.3301 103.516-84.5703L103.516-74.5117L74.4629-74.5117L74.4629-84.5703C74.4629-88.3301 72.4121-90.5762 68.3105-90.5762L46.9238-90.5762C42.7734-90.5762 40.7227-88.3301 40.7227-84.5703L40.7227-74.5117L32.666-74.5117C21.7773-74.5117 16.0645-68.75 16.0645-57.9102L16.0645 3.75977C16.0645 14.6484 21.7773 20.3613 32.666 20.3613ZM32.8125 16.4062C24.4141 16.4062 19.9707 12.0117 19.9707 3.56445L19.9707-57.7148C19.9707-66.1621 24.4141-70.5566 32.8125-70.5566L145.166-70.5566C153.32-70.5566 158.008-66.1621 158.008-57.7148L158.008 3.56445C158.008 12.0117 153.32 16.4062 145.166 16.4062Z"/>
|
||||
</g>
|
||||
<g id="Ultralight-L" transform="matrix(1 0 0 1 471.015 1556)">
|
||||
<path d="M31.9824 19.7754L145.41 19.7754C155.811 19.7754 161.328 14.0625 161.328 3.85742L161.328-58.0078C161.328-68.2129 155.811-73.9258 145.41-73.9258L137.402-73.9258L137.402-84.375C137.402-87.8906 135.449-89.9902 131.494-89.9902L109.473-89.9902C105.566-89.9902 103.613-87.8906 103.613-84.375L103.613-73.9258L73.7793-73.9258L73.7793-84.375C73.7793-87.8906 71.875-89.9902 67.9199-89.9902L45.8984-89.9902C41.9434-89.9902 40.0391-87.8906 40.0391-84.375L40.0391-73.9258L31.9824-73.9258C21.582-73.9258 16.0645-68.3594 16.0645-58.0078L16.0645 3.85742C16.0645 14.2578 21.582 19.7754 31.9824 19.7754ZM32.1289 17.2363C23.1934 17.2363 18.6035 12.6465 18.6035 3.75977L18.6035-57.8613C18.6035-66.748 23.1934-71.3867 32.1289-71.3867L145.264-71.3867C153.857-71.3867 158.789-66.748 158.789-57.8613L158.789 3.75977C158.789 12.6465 153.857 17.2363 145.264 17.2363Z"/>
|
||||
</g>
|
||||
<g id="Black-M" transform="matrix(1 0 0 1 2861.84 1126)">
|
||||
<path d="M31.9824 13.5742L111.133 13.5742C123.389 13.5742 130.664 6.29883 130.664-5.95703L130.664-50.0488C130.664-62.3047 123.389-69.5801 111.133-69.5801L107.471-69.5801L107.471-73.7793C107.471-80.1758 103.76-83.9355 97.4121-83.9355L87.5488-83.9355C81.1523-83.9355 77.4414-80.1758 77.4414-73.7793L77.4414-69.5801L65.6738-69.5801L65.6738-73.7793C65.6738-80.1758 61.9629-83.9355 55.6152-83.9355L45.7031-83.9355C39.3555-83.9355 35.6445-80.1758 35.6445-73.7793L35.6445-69.5801L31.9824-69.5801C19.7266-69.5801 12.4512-62.3047 12.4512-50.0488L12.4512-5.95703C12.4512 6.29883 19.7266 13.5742 31.9824 13.5742ZM34.9121-4.73633C32.0801-4.73633 30.7617-5.81055 30.7617-8.88672L30.7617-47.1191C30.7617-50.1953 32.0801-51.2695 34.9121-51.2695L108.203-51.2695C111.035-51.2695 112.402-50.1953 112.402-47.1191L112.402-8.88672C112.402-5.81055 111.035-4.73633 108.203-4.73633Z"/>
|
||||
</g>
|
||||
<g id="Heavy-M" transform="matrix(1 0 0 1 2565.5 1126)">
|
||||
<path d="M31.0059 12.6465L111.426 12.6465C123.193 12.6465 129.932 5.9082 129.932-5.81055L129.932-50.6348C129.932-62.3535 123.193-69.1406 111.426-69.1406L107.129-69.1406L107.129-73.877C107.129-79.6387 103.76-83.0566 98.0469-83.0566L87.1094-83.0566C81.3477-83.0566 78.0273-79.6387 78.0273-73.877L78.0273-69.1406L64.3555-69.1406L64.3555-73.877C64.3555-79.6387 61.0352-83.0566 55.2734-83.0566L44.3359-83.0566C38.5742-83.0566 35.2539-79.6387 35.2539-73.877L35.2539-69.1406L31.0059-69.1406C19.2383-69.1406 12.4512-62.3535 12.4512-50.6348L12.4512-5.81055C12.4512 5.9082 19.2383 12.6465 31.0059 12.6465ZM33.252-3.17383C29.9316-3.17383 28.2715-4.63867 28.2715-8.1543L28.2715-48.291C28.2715-51.8555 29.9316-53.2715 33.252-53.2715L109.131-53.2715C112.451-53.2715 114.111-51.8555 114.111-48.291L114.111-8.1543C114.111-4.63867 112.451-3.17383 109.131-3.17383Z"/>
|
||||
</g>
|
||||
<g id="Bold-M" transform="matrix(1 0 0 1 2269.18 1126)">
|
||||
<path d="M29.8828 11.6699L111.719 11.6699C122.949 11.6699 129.15 5.46875 129.15-5.66406L129.15-51.2695C129.15-62.4512 122.949-68.6035 111.719-68.6035L106.738-68.6035L106.738-73.9746C106.738-79.0527 103.809-82.0312 98.7793-82.0312L86.6211-82.0312C81.5918-82.0312 78.6621-79.0527 78.6621-73.9746L78.6621-68.6035L62.8906-68.6035L62.8906-73.9746C62.8906-79.0527 59.9609-82.0312 54.9316-82.0312L42.7734-82.0312C37.7441-82.0312 34.8145-79.0527 34.8145-73.9746L34.8145-68.6035L29.8828-68.6035C18.6523-68.6035 12.4512-62.4512 12.4512-51.2695L12.4512-5.66406C12.4512 5.51758 18.6523 11.6699 29.8828 11.6699ZM31.3965-1.41602C27.5391-1.41602 25.5371-3.27148 25.5371-7.32422L25.5371-49.6094C25.5371-53.7109 27.5391-55.5664 31.3965-55.5664L110.205-55.5664C114.014-55.5664 116.064-53.7109 116.064-49.6094L116.064-7.32422C116.064-3.27148 114.014-1.41602 110.205-1.41602Z"/>
|
||||
</g>
|
||||
<g id="Semibold-M" transform="matrix(1 0 0 1 1972.76 1126)">
|
||||
<path d="M29.1016 10.9863L111.914 10.9863C122.803 10.9863 128.564 5.17578 128.564-5.56641L128.564-51.7578C128.564-62.5 122.803-68.2617 111.914-68.2617L106.445-68.2617L106.445-74.0723C106.445-78.6133 103.809-81.3477 99.2676-81.3477L86.2793-81.3477C81.6895-81.3477 79.0527-78.6133 79.0527-74.0723L79.0527-68.2617L61.9141-68.2617L61.9141-74.0723C61.9141-78.6133 59.2285-81.3477 54.6875-81.3477L41.6992-81.3477C37.1582-81.3477 34.5215-78.6133 34.5215-74.0723L34.5215-68.2617L29.1016-68.2617C18.2617-68.2617 12.4512-62.5 12.4512-51.7578L12.4512-5.56641C12.4512 5.22461 18.2617 10.9863 29.1016 10.9863ZM30.127-0.195312C25.8789-0.195312 23.6328-2.34375 23.6328-6.78711L23.6328-50.5371C23.6328-54.9805 25.8789-57.0801 30.127-57.0801L110.889-57.0801C115.088-57.0801 117.383-54.9805 117.383-50.5371L117.383-6.78711C117.383-2.34375 115.088-0.195312 110.889-0.195312Z"/>
|
||||
</g>
|
||||
<g id="Medium-M" transform="matrix(1 0 0 1 1676.24 1126)">
|
||||
<path d="M28.5156 10.4492L112.061 10.4492C122.656 10.4492 128.174 4.98047 128.174-5.46875L128.174-52.0996C128.174-62.5488 122.656-68.0176 112.061-68.0176L106.25-68.0176L106.25-74.1211C106.25-78.3203 103.857-80.8105 99.6094-80.8105L86.0352-80.8105C81.8359-80.8105 79.3945-78.3203 79.3945-74.1211L79.3945-68.0176L61.1328-68.0176L61.1328-74.1211C61.1328-78.3203 58.6914-80.8105 54.4922-80.8105L40.918-80.8105C36.6699-80.8105 34.2773-78.3203 34.2773-74.1211L34.2773-68.0176L28.5156-68.0176C17.9688-68.0176 12.4512-62.5488 12.4512-52.0996L12.4512-5.46875C12.4512 4.98047 17.9688 10.4492 28.5156 10.4492ZM29.1504 0.732422C24.6582 0.732422 22.168-1.61133 22.168-6.34766L22.168-51.2207C22.168-55.957 24.6582-58.252 29.1504-58.252L111.426-58.252C115.918-58.252 118.408-55.957 118.408-51.2207L118.408-6.34766C118.408-1.61133 115.918 0.732422 111.426 0.732422Z"/>
|
||||
</g>
|
||||
<g id="Regular-M" transform="matrix(1 0 0 1 1379.82 1126)">
|
||||
<path d="M27.7832 9.76562L112.256 9.76562C122.51 9.76562 127.588 4.6875 127.588-5.37109L127.588-52.5391C127.588-62.5977 122.51-67.6758 112.256-67.6758L106.006-67.6758L106.006-74.1699C106.006-77.9297 103.857-80.127 100.098-80.127L85.6934-80.127C81.9824-80.127 79.834-77.9297 79.834-74.1699L79.834-67.6758L60.1562-67.6758L60.1562-74.1699C60.1562-77.9297 58.0078-80.127 54.248-80.127L39.8438-80.127C36.084-80.127 33.9355-77.9297 33.9355-74.1699L33.9355-67.6758L27.7832-67.6758C17.5781-67.6758 12.4512-62.6465 12.4512-52.5391L12.4512-5.37109C12.4512 4.73633 17.5781 9.76562 27.7832 9.76562ZM27.8809 1.9043C22.998 1.9043 20.3125-0.683594 20.3125-5.76172L20.3125-52.1484C20.3125-57.1777 22.998-59.8145 27.8809-59.8145L112.158-59.8145C116.992-59.8145 119.727-57.1777 119.727-52.1484L119.727-5.76172C119.727-0.683594 116.992 1.9043 112.158 1.9043Z"/>
|
||||
</g>
|
||||
<g id="Light-M" transform="matrix(1 0 0 1 1083.5 1126)">
|
||||
<path d="M26.8555 9.0332L112.402 9.0332C121.973 9.0332 126.807 4.15039 126.807-5.22461L126.807-52.6367C126.807-62.0117 121.973-66.8945 112.402-66.8945L106.152-66.8945L106.152-73.9258C106.152-77.3438 104.199-79.3945 100.684-79.3945L85.4492-79.3945C81.9336-79.3945 79.9805-77.3438 79.9805-73.9258L79.9805-66.8945L59.2285-66.8945L59.2285-73.9258C59.2285-77.3438 57.2754-79.3945 53.7598-79.3945L38.5254-79.3945C35.0098-79.3945 33.0566-77.3438 33.0566-73.9258L33.0566-66.8945L26.8555-66.8945C17.334-66.8945 12.4512-62.1094 12.4512-52.6367L12.4512-5.22461C12.4512 4.19922 17.334 9.0332 26.8555 9.0332ZM26.9531 2.97852C21.4844 2.97852 18.5059 0.0976562 18.5059-5.56641L18.5059-52.3438C18.5059-57.959 21.4844-60.8887 26.9531-60.8887L112.305-60.8887C117.676-60.8887 120.752-57.959 120.752-52.3438L120.752-5.56641C120.752 0.0976562 117.676 2.97852 112.305 2.97852Z"/>
|
||||
</g>
|
||||
<g id="Thin-M" transform="matrix(1 0 0 1 787.33 1126)">
|
||||
<path d="M25.6348 8.05664L112.598 8.05664C121.24 8.05664 125.732 3.4668 125.732-5.0293L125.732-52.7832C125.732-61.2793 121.24-65.918 112.598-65.918L106.348-65.918L106.348-73.584C106.348-76.5625 104.639-78.3691 101.416-78.3691L85.1074-78.3691C81.8359-78.3691 80.1758-76.5625 80.1758-73.584L80.1758-65.918L58.0078-65.918L58.0078-73.584C58.0078-76.5625 56.3477-78.3691 53.0762-78.3691L36.7676-78.3691C33.5449-78.3691 31.8359-76.5625 31.8359-73.584L31.8359-65.918L25.6348-65.918C16.9922-65.918 12.4512-61.377 12.4512-52.7832L12.4512-5.0293C12.4512 3.56445 16.9922 8.05664 25.6348 8.05664ZM25.7324 4.44336C19.3848 4.44336 16.0645 1.12305 16.0645-5.22461L16.0645-52.5879C16.0645-58.9844 19.3848-62.2559 25.7324-62.2559L112.451-62.2559C118.604-62.2559 122.119-58.9844 122.119-52.5879L122.119-5.22461C122.119 1.12305 118.604 4.44336 112.451 4.44336Z"/>
|
||||
</g>
|
||||
<g id="Ultralight-M" transform="matrix(1 0 0 1 490.888 1126)">
|
||||
<path d="M25 7.56836L112.695 7.56836C120.85 7.56836 125.195 3.125 125.195-4.98047L125.195-52.832C125.195-60.8887 120.85-65.3809 112.695-65.3809L106.445-65.3809L106.445-73.3887C106.445-76.1719 104.883-77.832 101.807-77.832L84.9121-77.832C81.8359-77.832 80.2734-76.1719 80.2734-73.3887L80.2734-65.3809L57.4219-65.3809L57.4219-73.3887C57.4219-76.1719 55.8594-77.832 52.7344-77.832L35.8887-77.832C32.7637-77.832 31.2012-76.1719 31.2012-73.3887L31.2012-65.3809L25-65.3809C16.7969-65.3809 12.4512-61.0352 12.4512-52.832L12.4512-4.98047C12.4512 3.22266 16.7969 7.56836 25 7.56836ZM25.0977 5.17578C18.3594 5.17578 14.8438 1.66016 14.8438-5.07812L14.8438-52.7344C14.8438-59.4727 18.3594-62.9883 25.0977-62.9883L112.549-62.9883C119.043-62.9883 122.803-59.4727 122.803-52.7344L122.803-5.07812C122.803 1.66016 119.043 5.17578 112.549 5.17578Z"/>
|
||||
</g>
|
||||
<g id="Black-S" transform="matrix(1 0 0 1 2877.35 696)">
|
||||
<path d="M25 2.92969L87.1094 2.92969C96.6797 2.92969 102.344-2.73438 102.344-12.3047L102.344-46.875C102.344-56.4453 96.6797-62.1094 87.1094-62.1094L84.1797-62.1094L84.1797-65.4297C84.1797-70.4102 81.2988-73.3398 76.3672-73.3398L68.5547-73.3398C63.623-73.3398 60.7422-70.4102 60.7422-65.4297L60.7422-62.1094L51.3672-62.1094L51.3672-65.4297C51.3672-70.4102 48.4863-73.3398 43.5547-73.3398L35.7422-73.3398C30.8105-73.3398 27.9297-70.4102 27.9297-65.4297L27.9297-62.1094L25-62.1094C15.4297-62.1094 9.76562-56.4453 9.76562-46.875L9.76562-12.3047C9.76562-2.73438 15.4297 2.92969 25 2.92969ZM27.2461-11.2305C25-11.2305 23.9258-12.1094 23.9258-14.5508L23.9258-44.6289C23.9258-47.0703 25-47.9492 27.2461-47.9492L84.8633-47.9492C87.1094-47.9492 88.1836-47.0703 88.1836-44.6289L88.1836-14.5508C88.1836-12.1094 87.1094-11.2305 84.8633-11.2305Z"/>
|
||||
</g>
|
||||
<g id="Heavy-S" transform="matrix(1 0 0 1 2580.88 696)">
|
||||
<path d="M24.3652 2.34375L87.3047 2.34375C96.582 2.34375 101.855-2.97852 101.855-12.207L101.855-47.3145C101.855-56.543 96.582-61.8652 87.3047-61.8652L83.8867-61.8652L83.8867-65.5273C83.8867-70.0684 81.2988-72.7539 76.8066-72.7539L68.2617-72.7539C63.7695-72.7539 61.1328-70.0684 61.1328-65.5273L61.1328-61.8652L50.4883-61.8652L50.4883-65.5273C50.4883-70.0684 47.8516-72.7539 43.3594-72.7539L34.8145-72.7539C30.3223-72.7539 27.7344-70.0684 27.7344-65.5273L27.7344-61.8652L24.3652-61.8652C15.0879-61.8652 9.76562-56.543 9.76562-47.3145L9.76562-12.207C9.76562-2.97852 15.0879 2.34375 24.3652 2.34375ZM26.0742-10.1562C23.5352-10.1562 22.2656-11.2793 22.2656-14.0137L22.2656-45.5078C22.2656-48.2422 23.5352-49.3652 26.0742-49.3652L85.5469-49.3652C88.0859-49.3652 89.4043-48.2422 89.4043-45.5078L89.4043-14.0137C89.4043-11.2793 88.0859-10.1562 85.5469-10.1562Z"/>
|
||||
</g>
|
||||
<g id="Bold-S" transform="matrix(1 0 0 1 2284.41 696)">
|
||||
<path d="M23.6328 1.66016L87.5 1.66016C96.4844 1.66016 101.367-3.22266 101.367-12.1094L101.367-47.8027C101.367-56.6895 96.4844-61.5723 87.5-61.5723L83.5938-61.5723L83.5938-65.6738C83.5938-69.6777 81.25-72.0703 77.2461-72.0703L67.9199-72.0703C63.916-72.0703 61.6211-69.6777 61.6211-65.6738L61.6211-61.5723L49.4629-61.5723L49.4629-65.6738C49.4629-69.6777 47.1191-72.0703 43.1641-72.0703L33.7891-72.0703C29.834-72.0703 27.4902-69.6777 27.4902-65.6738L27.4902-61.5723L23.6328-61.5723C14.6973-61.5723 9.76562-56.6895 9.76562-47.8027L9.76562-12.1094C9.76562-3.22266 14.6973 1.66016 23.6328 1.66016ZM24.8047-8.93555C21.9238-8.93555 20.3613-10.3516 20.3613-13.4277L20.3613-46.4844C20.3613-49.5605 21.9238-50.9766 24.8047-50.9766L86.3281-50.9766C89.209-50.9766 90.7715-49.5605 90.7715-46.4844L90.7715-13.4277C90.7715-10.3516 89.209-8.93555 86.3281-8.93555Z"/>
|
||||
</g>
|
||||
<g id="Semibold-S" transform="matrix(1 0 0 1 1987.9 696)">
|
||||
<path d="M23.0957 1.17188L87.6465 1.17188C96.3867 1.17188 100.977-3.36914 100.977-12.0117L100.977-48.1445C100.977-56.7871 96.3867-61.377 87.6465-61.377L83.3496-61.377L83.3496-65.7227C83.3496-69.4336 81.25-71.582 77.5879-71.582L67.6758-71.582C64.0625-71.582 61.9141-69.4336 61.9141-65.7227L61.9141-61.377L48.7793-61.377L48.7793-65.7227C48.7793-69.4336 46.6309-71.582 43.0176-71.582L33.1055-71.582C29.4434-71.582 27.3438-69.4336 27.3438-65.7227L27.3438-61.377L23.0957-61.377C14.4043-61.377 9.76562-56.7871 9.76562-48.1445L9.76562-12.0117C9.76562-3.36914 14.4043 1.17188 23.0957 1.17188ZM23.877-8.10547C20.752-8.10547 19.0918-9.7168 19.0918-12.9883L19.0918-47.168C19.0918-50.4883 20.752-52.0508 23.877-52.0508L86.8652-52.0508C89.9902-52.0508 91.6992-50.4883 91.6992-47.168L91.6992-12.9883C91.6992-9.7168 89.9902-8.10547 86.8652-8.10547Z"/>
|
||||
</g>
|
||||
<g id="Medium-S" transform="matrix(1 0 0 1 1691.31 696)">
|
||||
<path d="M22.7051 0.830078L87.7441 0.830078C96.3379 0.830078 100.732-3.51562 100.732-11.9629L100.732-48.3887C100.732-56.8359 96.3379-61.2305 87.7441-61.2305L83.2031-61.2305L83.2031-65.8203C83.2031-69.2383 81.2012-71.2402 77.832-71.2402L67.5293-71.2402C64.1602-71.2402 62.1582-69.2383 62.1582-65.8203L62.1582-61.2305L48.2422-61.2305L48.2422-65.8203C48.2422-69.2383 46.2891-71.2402 42.8711-71.2402L32.5684-71.2402C29.1992-71.2402 27.1973-69.2383 27.1973-65.8203L27.1973-61.2305L22.7051-61.2305C14.209-61.2305 9.76562-56.8359 9.76562-48.3887L9.76562-11.9629C9.76562-3.51562 14.209 0.830078 22.7051 0.830078ZM23.1934-7.4707C19.9219-7.4707 18.0664-9.22852 18.0664-12.6953L18.0664-47.7051C18.0664-51.1719 19.9219-52.8809 23.1934-52.8809L87.3047-52.8809C90.5762-52.8809 92.3828-51.1719 92.3828-47.7051L92.3828-12.6953C92.3828-9.22852 90.5762-7.4707 87.3047-7.4707Z"/>
|
||||
</g>
|
||||
<g id="Regular-S" transform="matrix(1 0 0 1 1394.79 696)">
|
||||
<path d="M22.2168 0.390625L87.8906 0.390625C96.2402 0.390625 100.342-3.71094 100.342-11.9141L100.342-48.7305C100.342-56.9336 96.2402-61.0352 87.8906-61.0352L82.959-61.0352L82.959-65.8691C82.959-68.9453 81.2012-70.8008 78.1738-70.8008L67.2852-70.8008C64.2578-70.8008 62.4512-68.9453 62.4512-65.8691L62.4512-61.0352L47.5586-61.0352L47.5586-65.8691C47.5586-68.9453 45.8008-70.8008 42.7246-70.8008L31.8848-70.8008C28.8086-70.8008 27.0508-68.9453 27.0508-65.8691L27.0508-61.0352L22.2168-61.0352C13.916-61.0352 9.76562-56.9336 9.76562-48.7305L9.76562-11.9141C9.76562-3.71094 13.916 0.390625 22.2168 0.390625ZM22.3145-6.68945C18.7988-6.68945 16.7969-8.54492 16.7969-12.2559L16.7969-48.3887C16.7969-52.0508 18.7988-53.9551 22.3145-53.9551L87.793-53.9551C91.3086-53.9551 93.3105-52.0508 93.3105-48.3887L93.3105-12.2559C93.3105-8.54492 91.3086-6.68945 87.793-6.68945Z"/>
|
||||
</g>
|
||||
<g id="Light-S" transform="matrix(1 0 0 1 1098.42 696)">
|
||||
<path d="M21.3867-0.292969L88.0371-0.292969C95.752-0.292969 99.6582-4.15039 99.6582-11.7676L99.6582-48.8281C99.6582-56.4453 95.752-60.3516 88.0371-60.3516L83.1055-60.3516L83.1055-65.625C83.1055-68.457 81.4941-70.1172 78.6621-70.1172L67.041-70.1172C64.209-70.1172 62.5977-68.457 62.5977-65.625L62.5977-60.3516L46.7773-60.3516L46.7773-65.625C46.7773-68.457 45.166-70.1172 42.2852-70.1172L30.7129-70.1172C27.832-70.1172 26.2695-68.457 26.2695-65.625L26.2695-60.3516L21.3867-60.3516C13.6719-60.3516 9.76562-56.4941 9.76562-48.8281L9.76562-11.7676C9.76562-4.15039 13.6719-0.292969 21.3867-0.292969ZM21.4844-5.71289C17.4316-5.71289 15.1855-7.86133 15.1855-12.0605L15.1855-48.5352C15.1855-52.7344 17.4316-54.9316 21.4844-54.9316L87.9395-54.9316C91.9434-54.9316 94.2383-52.7344 94.2383-48.5352L94.2383-12.0605C94.2383-7.86133 91.9434-5.71289 87.9395-5.71289Z"/>
|
||||
</g>
|
||||
<g id="Thin-S" transform="matrix(1 0 0 1 802.174 696)">
|
||||
<path d="M20.3125-1.12305L88.1836-1.12305C95.1172-1.12305 98.7305-4.78516 98.7305-11.6211L98.7305-48.9258C98.7305-55.8105 95.1172-59.4727 88.1836-59.4727L83.3008-59.4727L83.3008-65.332C83.3008-67.7734 81.9336-69.2383 79.2969-69.2383L66.748-69.2383C64.1602-69.2383 62.793-67.7734 62.793-65.332L62.793-59.4727L45.7031-59.4727L45.7031-65.332C45.7031-67.7734 44.3359-69.2383 41.748-69.2383L29.1504-69.2383C26.5625-69.2383 25.1953-67.7734 25.1953-65.332L25.1953-59.4727L20.3125-59.4727C13.3789-59.4727 9.76562-55.8594 9.76562-48.9258L9.76562-11.6211C9.76562-4.6875 13.3789-1.12305 20.3125-1.12305ZM20.4102-4.44336C15.625-4.44336 13.0859-6.93359 13.0859-11.8164L13.0859-48.7793C13.0859-53.6133 15.625-56.1523 20.4102-56.1523L88.0859-56.1523C92.7246-56.1523 95.4102-53.6133 95.4102-48.7793L95.4102-11.8164C95.4102-6.93359 92.7246-4.44336 88.0859-4.44336Z"/>
|
||||
</g>
|
||||
<g id="Ultralight-S" transform="matrix(1 0 0 1 505.707 696)">
|
||||
<path d="M19.7754-1.5625L88.2812-1.5625C94.8242-1.5625 98.2422-5.12695 98.2422-11.5234L98.2422-49.0234C98.2422-55.4688 94.8242-58.9844 88.2812-58.9844L83.3984-58.9844L83.3984-65.1855C83.3984-67.4316 82.1289-68.75 79.6387-68.75L66.6016-68.75C64.1113-68.75 62.8906-67.4316 62.8906-65.1855L62.8906-58.9844L45.166-58.9844L45.166-65.1855C45.166-67.4316 43.8965-68.75 41.4062-68.75L28.3691-68.75C25.8789-68.75 24.6582-67.4316 24.6582-65.1855L24.6582-58.9844L19.7754-58.9844C13.2324-58.9844 9.76562-55.5176 9.76562-49.0234L9.76562-11.5234C9.76562-5.0293 13.2324-1.5625 19.7754-1.5625ZM19.873-3.75977C14.6484-3.75977 11.9629-6.44531 11.9629-11.6699L11.9629-48.877C11.9629-54.1016 14.6484-56.7871 19.873-56.7871L88.1836-56.7871C93.1641-56.7871 96.0449-54.1016 96.0449-48.877L96.0449-11.6699C96.0449-6.44531 93.1641-3.75977 88.1836-3.75977Z"/>
|
||||
<g id="Ultralight-S" transform="matrix(1 0 0 1 506.104 696)">
|
||||
<path d="M9.76562-8.74171C9.76562-3.6787 13.1895-0.30711 18.399-0.30711L68.3242-0.30711C73.5303-0.30711 76.9541-3.6787 76.9541-8.74171L76.9541-25.1743C76.9541-26.2075 77.7954-26.9057 78.8809-26.103C81.0532-24.5302 83.4834-22.2788 88.5337-22.2788C95.582-22.2788 100.378-27.1948 100.378-34.6636C100.378-42.0903 95.582-47.0484 88.5337-47.0484C83.4834-47.0484 81.0532-44.7549 78.8809-43.1787C77.7954-42.4248 76.9541-43.0743 76.9541-44.1109L76.9541-61.8638C76.9541-66.9268 73.5303-70.2984 68.3242-70.2984L18.399-70.2984C13.1895-70.2984 9.76562-66.9268 9.76562-61.8638L9.76562-43.9805C9.76562-41.9248 10.9707-40.9116 12.8491-40.9116C13.7305-40.9116 14.5279-41.2773 15.5909-42.1518C17.939-44.081 20.084-45.4243 23.5391-45.4243C29.3174-45.4243 33.2031-41.3945 33.2031-35.2539C33.2031-29.1133 29.3174-25.0835 23.5391-25.0835C20.084-25.0835 17.939-26.4268 15.5909-28.356C14.5279-29.2305 13.7305-29.5962 12.8491-29.5962C10.9707-29.5962 9.76562-28.583 9.76562-26.5273ZM11.9834-8.81447L11.9834-26.2094C11.9834-27.3452 12.8658-27.4653 13.9126-26.7114C16.1167-25.1557 18.5264-22.8691 23.563-22.8691C30.6113-22.8691 35.4038-27.8306 35.4038-35.2539C35.4038-42.6773 30.6113-47.6387 23.563-47.6387C18.5264-47.6387 16.1167-45.3521 13.9126-43.7964C12.8658-43.0425 11.9834-43.1626 11.9834-44.2984L11.9834-61.791C11.9834-65.5859 14.5757-68.0805 18.4966-68.0805L68.2266-68.0805C72.144-68.0805 74.7363-65.5859 74.7363-61.791L74.7363-43.8477C74.7363-41.792 75.9868-40.3213 77.8198-40.3213C78.7012-40.3213 79.544-40.687 80.5615-41.5615C82.9551-43.4941 85.1001-44.834 88.5098-44.834C94.2881-44.834 98.1738-40.7588 98.1738-34.6636C98.1738-28.5264 94.2881-24.4932 88.5098-24.4932C85.1001-24.4932 82.9551-25.8364 80.5615-27.7656C79.544-28.6402 78.7012-28.9605 77.8198-28.9605C75.9868-28.9605 74.7363-27.5386 74.7363-25.4375L74.7363-8.81447C74.7363-5.01955 72.144-2.52492 68.2266-2.52492L18.4966-2.52492C14.5757-2.52492 11.9834-5.01955 11.9834-8.81447Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Copy Article URL</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@copy_article_url@</string>
|
||||
<key>copy_article_url</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>other</key>
|
||||
<string>Copy Article URLs</string>
|
||||
<key>one</key>
|
||||
<string>Copy Article URL</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -56,15 +56,14 @@ extension AppDelegate : AppDelegateAppleEvents {
|
||||
if let themeURL = URL(string: themeURLString) {
|
||||
let request = URLRequest(url: themeURL)
|
||||
let task = URLSession.shared.downloadTask(with: request) { [weak self] location, response, error in
|
||||
guard let location = location else {
|
||||
guard let self, let location else {
|
||||
return
|
||||
}
|
||||
|
||||
do {
|
||||
try ArticleThemeDownloader.shared.handleFile(at: location)
|
||||
} catch {
|
||||
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
|
||||
self?.logger.error("Failed to import theme: \(error.localizedDescription, privacy: .public)")
|
||||
self.presentThemeImportError(error)
|
||||
}
|
||||
}
|
||||
task.resume()
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
511D43D2231FA62C00FB1562 /* GlobalKeyboardShortcuts.plist in Resources */ = {isa = PBXBuildFile; fileRef = 844B5B641FEA11F200C7C76A /* GlobalKeyboardShortcuts.plist */; };
|
||||
511D43EF231FBDE900FB1562 /* LaunchScreenPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 511D43ED231FBDE800FB1562 /* LaunchScreenPad.storyboard */; };
|
||||
511D4419231FC02D00FB1562 /* KeyboardManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 511D4410231FC02D00FB1562 /* KeyboardManager.swift */; };
|
||||
51236339236915B100951F16 /* RoundedProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512363372369155100951F16 /* RoundedProgressView.swift */; };
|
||||
512392BE24E33A3C00F11704 /* RedditSelectAccountTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE603246AF37B00731738 /* RedditSelectAccountTableViewController.swift */; };
|
||||
512392BF24E33A3C00F11704 /* RedditSelectSortTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE607246AFC9900731738 /* RedditSelectSortTableViewController.swift */; };
|
||||
512392C024E33A3C00F11704 /* RedditAdd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 516AE5FF246AF34100731738 /* RedditAdd.storyboard */; };
|
||||
@@ -193,6 +192,7 @@
|
||||
513F32882593EF8F0003048F /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 513F32872593EF8F0003048F /* RSCore */; };
|
||||
513F32892593EF8F0003048F /* RSCore in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 513F32872593EF8F0003048F /* RSCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
5141E7392373C18B0013FF27 /* WebFeedInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5141E7382373C18B0013FF27 /* WebFeedInspectorViewController.swift */; };
|
||||
514217062921C9DD00963F14 /* Bundle-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF42273625800C787DC /* Bundle-Extensions.swift */; };
|
||||
5142192A23522B5500E07E2C /* ImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5142192923522B5500E07E2C /* ImageViewController.swift */; };
|
||||
514219372352510100E07E2C /* ImageScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514219362352510100E07E2C /* ImageScrollView.swift */; };
|
||||
5142194B2353C1CF00E07E2C /* main_mac.js in Resources */ = {isa = PBXBuildFile; fileRef = 5142194A2353C1CF00E07E2C /* main_mac.js */; };
|
||||
@@ -299,7 +299,6 @@
|
||||
51A1699B235E10D700EB091F /* AccountInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A16991235E10D600EB091F /* AccountInspectorViewController.swift */; };
|
||||
51A1699C235E10D700EB091F /* AddAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A16992235E10D600EB091F /* AddAccountViewController.swift */; };
|
||||
51A1699D235E10D700EB091F /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A16993235E10D600EB091F /* SettingsViewController.swift */; };
|
||||
51A1699F235E10D700EB091F /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A16995235E10D600EB091F /* AboutViewController.swift */; };
|
||||
51A169A0235E10D700EB091F /* FeedbinAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A16996235E10D700EB091F /* FeedbinAccountViewController.swift */; };
|
||||
51A66685238075AE00CB272D /* AddWebFeedDefaultContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A66684238075AE00CB272D /* AddWebFeedDefaultContainer.swift */; };
|
||||
51A737AE24DB19730015FA66 /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 51A737AD24DB19730015FA66 /* RSCore */; };
|
||||
@@ -399,8 +398,6 @@
|
||||
51C4CFF224D37D1F00AF9874 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C4CFEF24D37D1F00AF9874 /* Secrets.swift */; };
|
||||
51C4CFF624D37DD500AF9874 /* Secrets in Frameworks */ = {isa = PBXBuildFile; productRef = 51C4CFF524D37DD500AF9874 /* Secrets */; };
|
||||
51C9DE5823EA2EF4003D5A6D /* WrapperScriptMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C9DE5723EA2EF4003D5A6D /* WrapperScriptMessageHandler.swift */; };
|
||||
51CE1C0923621EDA005548FC /* RefreshProgressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51CE1C0823621EDA005548FC /* RefreshProgressView.xib */; };
|
||||
51CE1C0B23622007005548FC /* RefreshProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51CE1C0A23622006005548FC /* RefreshProgressView.swift */; };
|
||||
51CE1C712367721A005548FC /* testURLsOfCurrentArticle.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 84F9EADB213660A100CF2DE4 /* testURLsOfCurrentArticle.applescript */; };
|
||||
51D0214626ED617100FF2E0F /* core.css in Resources */ = {isa = PBXBuildFile; fileRef = 51D0214526ED617100FF2E0F /* core.css */; };
|
||||
51D0214726ED617100FF2E0F /* core.css in Resources */ = {isa = PBXBuildFile; fileRef = 51D0214526ED617100FF2E0F /* core.css */; };
|
||||
@@ -408,6 +405,7 @@
|
||||
51D205EF28E3CF8D007C46EF /* LinkTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D205EE28E3CF8D007C46EF /* LinkTextField.swift */; };
|
||||
51D205F028E3CF8D007C46EF /* LinkTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D205EE28E3CF8D007C46EF /* LinkTextField.swift */; };
|
||||
51D5948722668EFA00DFC836 /* MarkStatusCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84702AA31FA27AC0006B8943 /* MarkStatusCommand.swift */; };
|
||||
51D5D116291EEF5600AA1278 /* RefreshProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D5D114291EEDC600AA1278 /* RefreshProgressView.swift */; };
|
||||
51D6A5BC23199C85001C27D8 /* MasterTimelineDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D6A5BB23199C85001C27D8 /* MasterTimelineDataSource.swift */; };
|
||||
51D87EE12311D34700E63F03 /* ActivityType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D87EE02311D34700E63F03 /* ActivityType.swift */; };
|
||||
51DC07982552083500A3F79F /* ArticleTextSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51DC07972552083500A3F79F /* ArticleTextSize.swift */; };
|
||||
@@ -439,10 +437,6 @@
|
||||
51EF0F7E2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F7D2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift */; };
|
||||
51EF0F802277A8330050506E /* MasterTimelineCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F7F2277A8330050506E /* MasterTimelineCellLayout.swift */; };
|
||||
51EFDA1B24E6D16A0085C3D6 /* SafariExt.js in Resources */ = {isa = PBXBuildFile; fileRef = 515D4FCB2325815A00EE1167 /* SafariExt.js */; };
|
||||
51F85BEB22724CB600C787DC /* About.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 51F85BEA22724CB600C787DC /* About.rtf */; };
|
||||
51F85BEF2272520B00C787DC /* Thanks.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 51F85BEE2272520B00C787DC /* Thanks.rtf */; };
|
||||
51F85BF12272524100C787DC /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 51F85BF02272524100C787DC /* Credits.rtf */; };
|
||||
51F85BF32272531500C787DC /* Dedication.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 51F85BF22272531500C787DC /* Dedication.rtf */; };
|
||||
51F85BF52273625800C787DC /* Bundle-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF42273625800C787DC /* Bundle-Extensions.swift */; };
|
||||
51F85BF722749FA100C787DC /* UIFont-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF622749FA100C787DC /* UIFont-Extensions.swift */; };
|
||||
51F85BF92274AA7B00C787DC /* UIBarButtonItem-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF82274AA7B00C787DC /* UIBarButtonItem-Extensions.swift */; };
|
||||
@@ -825,6 +819,7 @@
|
||||
84F9EAF4213660A100CF2DE4 /* testGenericScript.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 84F9EAE1213660A100CF2DE4 /* testGenericScript.applescript */; };
|
||||
84F9EAF5213660A100CF2DE4 /* establishMainWindowStartingState.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 84F9EAE2213660A100CF2DE4 /* establishMainWindowStartingState.applescript */; };
|
||||
84FF69B11FC3793300DC198E /* FaviconURLFinder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84FF69B01FC3793300DC198E /* FaviconURLFinder.swift */; };
|
||||
B20180AB28E3B76F0059686A /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = B20180AA28E3B76F0059686A /* Localizable.stringsdict */; };
|
||||
B24E9ADC245AB88400DA5718 /* NSAttributedString+NetNewsWire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B24E9ABA245AB88300DA5718 /* NSAttributedString+NetNewsWire.swift */; };
|
||||
B24E9ADD245AB88400DA5718 /* NSAttributedString+NetNewsWire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B24E9ABA245AB88300DA5718 /* NSAttributedString+NetNewsWire.swift */; };
|
||||
B24E9ADE245AB88400DA5718 /* NSAttributedString+NetNewsWire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B24E9ABA245AB88300DA5718 /* NSAttributedString+NetNewsWire.swift */; };
|
||||
@@ -834,6 +829,8 @@
|
||||
B2B8075E239C49D300F191E0 /* RSImage-AppIcons.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B8075D239C49D300F191E0 /* RSImage-AppIcons.swift */; };
|
||||
B2B80778239C4C7000F191E0 /* RSImage-AppIcons.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B8075D239C49D300F191E0 /* RSImage-AppIcons.swift */; };
|
||||
B2B80779239C4C7300F191E0 /* RSImage-AppIcons.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B8075D239C49D300F191E0 /* RSImage-AppIcons.swift */; };
|
||||
B2C12C6628F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C12C6528F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift */; };
|
||||
B2C12C6728F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C12C6528F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift */; };
|
||||
B528F81E23333C7E00E735DD /* page.html in Resources */ = {isa = PBXBuildFile; fileRef = B528F81D23333C7E00E735DD /* page.html */; };
|
||||
BDCB516724282C8A00102A80 /* AccountsNewsBlur.xib in Resources */ = {isa = PBXBuildFile; fileRef = BDCB514D24282C8A00102A80 /* AccountsNewsBlur.xib */; };
|
||||
BDCB516824282C8A00102A80 /* AccountsNewsBlur.xib in Resources */ = {isa = PBXBuildFile; fileRef = BDCB514D24282C8A00102A80 /* AccountsNewsBlur.xib */; };
|
||||
@@ -853,11 +850,24 @@
|
||||
D5F4EDB720074D6500B9E363 /* WebFeed+Scriptability.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F4EDB620074D6500B9E363 /* WebFeed+Scriptability.swift */; };
|
||||
D5F4EDB920074D7C00B9E363 /* Folder+Scriptability.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F4EDB820074D7C00B9E363 /* Folder+Scriptability.swift */; };
|
||||
DD82AB0A231003F6002269DF /* SharingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD82AB09231003F6002269DF /* SharingTests.swift */; };
|
||||
DDF9E1D728EDF2FC000BC355 /* notificationSoundBlip.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DDF9E1D628EDF2FC000BC355 /* notificationSoundBlip.mp3 */; };
|
||||
DDF9E1D828EDF2FC000BC355 /* notificationSoundBlip.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DDF9E1D628EDF2FC000BC355 /* notificationSoundBlip.mp3 */; };
|
||||
DDF9E1D928EDF2FC000BC355 /* notificationSoundBlip.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DDF9E1D628EDF2FC000BC355 /* notificationSoundBlip.mp3 */; };
|
||||
DF5AD10128D6922200CA3BF7 /* SmartFeedSummaryWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1768144D2564BCE000D98635 /* SmartFeedSummaryWidget.swift */; };
|
||||
DFD6AACF27ADE86E00463FAD /* NewsFax.nnwtheme in Resources */ = {isa = PBXBuildFile; fileRef = DFD6AACD27ADE86E00463FAD /* NewsFax.nnwtheme */; };
|
||||
DF790D6228E990A900455FC7 /* AboutData.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF790D6128E990A900455FC7 /* AboutData.swift */; };
|
||||
DFC14F0F28EA55BD00F6EE86 /* AboutWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC14F0E28EA55BD00F6EE86 /* AboutWindowController.swift */; };
|
||||
DFC14F1228EA5DC500F6EE86 /* AboutData.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF790D6128E990A900455FC7 /* AboutData.swift */; };
|
||||
DFC14F1328EA677C00F6EE86 /* Bundle-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF42273625800C787DC /* Bundle-Extensions.swift */; };
|
||||
DFC14F1528EB177000F6EE86 /* AboutNetNewsWireView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC14F1428EB177000F6EE86 /* AboutNetNewsWireView.swift */; };
|
||||
DFC14F1728EB17A800F6EE86 /* CreditsNetNewsWireView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC14F1628EB17A800F6EE86 /* CreditsNetNewsWireView.swift */; };
|
||||
DFCE4F9128EF26F100405869 /* About.plist in Resources */ = {isa = PBXBuildFile; fileRef = DFCE4F9028EF26F000405869 /* About.plist */; };
|
||||
DFCE4F9228EF26F100405869 /* About.plist in Resources */ = {isa = PBXBuildFile; fileRef = DFCE4F9028EF26F000405869 /* About.plist */; };
|
||||
DFCE4F9428EF278300405869 /* Thanks.md in Resources */ = {isa = PBXBuildFile; fileRef = DFCE4F9328EF278300405869 /* Thanks.md */; };
|
||||
DFCE4F9528EF278300405869 /* Thanks.md in Resources */ = {isa = PBXBuildFile; fileRef = DFCE4F9328EF278300405869 /* Thanks.md */; };
|
||||
DFFB8FC2279B75E300AC21D7 /* Account in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 51BC2F4A24D343A500E90810 /* Account */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
DFFC199827A0D0D7004B7AEF /* NotificationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFC199727A0D0D7004B7AEF /* NotificationsViewController.swift */; };
|
||||
DFFC199A27A0D32A004B7AEF /* NotificationsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFC199927A0D32A004B7AEF /* NotificationsTableViewCell.swift */; };
|
||||
DFFC4E7428E95C01006B82AF /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFC4E7328E95C01006B82AF /* AboutView.swift */; };
|
||||
FF3ABF13232599810074C542 /* ArticleSorterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3ABF09232599450074C542 /* ArticleSorterTests.swift */; };
|
||||
FF3ABF1523259DDB0074C542 /* ArticleSorter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3ABF1423259DDB0074C542 /* ArticleSorter.swift */; };
|
||||
FF3ABF162325AF5D0074C542 /* ArticleSorter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3ABF1423259DDB0074C542 /* ArticleSorter.swift */; };
|
||||
@@ -1190,7 +1200,6 @@
|
||||
511B9805237DCAC90028BCAA /* UserInfoKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInfoKey.swift; sourceTree = "<group>"; };
|
||||
511D43EE231FBDE800FB1562 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreenPad.storyboard; sourceTree = "<group>"; };
|
||||
511D4410231FC02D00FB1562 /* KeyboardManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardManager.swift; sourceTree = "<group>"; };
|
||||
512363372369155100951F16 /* RoundedProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedProgressView.swift; sourceTree = "<group>"; };
|
||||
5126EE96226CB48A00C22AFC /* SceneCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneCoordinator.swift; sourceTree = "<group>"; };
|
||||
5127B236222B4849006D641D /* DetailKeyboardDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailKeyboardDelegate.swift; sourceTree = "<group>"; };
|
||||
5127B237222B4849006D641D /* DetailKeyboardShortcuts.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DetailKeyboardShortcuts.plist; sourceTree = "<group>"; };
|
||||
@@ -1295,7 +1304,6 @@
|
||||
51A16991235E10D600EB091F /* AccountInspectorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountInspectorViewController.swift; sourceTree = "<group>"; };
|
||||
51A16992235E10D600EB091F /* AddAccountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddAccountViewController.swift; sourceTree = "<group>"; };
|
||||
51A16993235E10D600EB091F /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
|
||||
51A16995235E10D600EB091F /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; };
|
||||
51A16996235E10D700EB091F /* FeedbinAccountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbinAccountViewController.swift; sourceTree = "<group>"; };
|
||||
51A66684238075AE00CB272D /* AddWebFeedDefaultContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWebFeedDefaultContainer.swift; sourceTree = "<group>"; };
|
||||
51A9A5E32380C8870033AADF /* ShareFolderPickerAccountCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShareFolderPickerAccountCell.xib; sourceTree = "<group>"; };
|
||||
@@ -1341,10 +1349,9 @@
|
||||
51CD32C424D2CF1D009ABAEF /* Articles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Articles; sourceTree = "<group>"; };
|
||||
51CD32C624D2DEF9009ABAEF /* Account */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Account; sourceTree = "<group>"; };
|
||||
51CD32C724D2E06C009ABAEF /* Secrets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Secrets; sourceTree = "<group>"; };
|
||||
51CE1C0823621EDA005548FC /* RefreshProgressView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RefreshProgressView.xib; sourceTree = "<group>"; };
|
||||
51CE1C0A23622006005548FC /* RefreshProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshProgressView.swift; sourceTree = "<group>"; };
|
||||
51D0214526ED617100FF2E0F /* core.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = core.css; sourceTree = "<group>"; };
|
||||
51D205EE28E3CF8D007C46EF /* LinkTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkTextField.swift; sourceTree = "<group>"; };
|
||||
51D5D114291EEDC600AA1278 /* RefreshProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshProgressView.swift; sourceTree = "<group>"; };
|
||||
51D6A5BB23199C85001C27D8 /* MasterTimelineDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineDataSource.swift; sourceTree = "<group>"; };
|
||||
51D87EE02311D34700E63F03 /* ActivityType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityType.swift; sourceTree = "<group>"; };
|
||||
51DC07972552083500A3F79F /* ArticleTextSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleTextSize.swift; sourceTree = "<group>"; };
|
||||
@@ -1371,10 +1378,6 @@
|
||||
51EF0F7F2277A8330050506E /* MasterTimelineCellLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineCellLayout.swift; sourceTree = "<group>"; };
|
||||
51F805D32428499E0022C792 /* NetNewsWire-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NetNewsWire-dev.entitlements"; sourceTree = "<group>"; };
|
||||
51F805ED24284C1C0022C792 /* NetNewsWire-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NetNewsWire-dev.entitlements"; sourceTree = "<group>"; };
|
||||
51F85BEA22724CB600C787DC /* About.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = About.rtf; sourceTree = "<group>"; };
|
||||
51F85BEE2272520B00C787DC /* Thanks.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Thanks.rtf; sourceTree = "<group>"; };
|
||||
51F85BF02272524100C787DC /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
|
||||
51F85BF22272531500C787DC /* Dedication.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Dedication.rtf; sourceTree = "<group>"; };
|
||||
51F85BF42273625800C787DC /* Bundle-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle-Extensions.swift"; sourceTree = "<group>"; };
|
||||
51F85BF622749FA100C787DC /* UIFont-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont-Extensions.swift"; sourceTree = "<group>"; };
|
||||
51F85BF82274AA7B00C787DC /* UIBarButtonItem-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem-Extensions.swift"; sourceTree = "<group>"; };
|
||||
@@ -1566,11 +1569,13 @@
|
||||
84F9EAE2213660A100CF2DE4 /* establishMainWindowStartingState.applescript */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.applescript; path = establishMainWindowStartingState.applescript; sourceTree = "<group>"; };
|
||||
84F9EAE4213660A100CF2DE4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
84FF69B01FC3793300DC198E /* FaviconURLFinder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconURLFinder.swift; sourceTree = "<group>"; };
|
||||
B20180AA28E3B76F0059686A /* Localizable.stringsdict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.stringsdict; path = Localizable.stringsdict; sourceTree = "<group>"; };
|
||||
B24E9ABA245AB88300DA5718 /* NSAttributedString+NetNewsWire.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+NetNewsWire.swift"; sourceTree = "<group>"; };
|
||||
B24EFD482330FF99006C6242 /* NetNewsWire-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NetNewsWire-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
B24EFD5923310109006C6242 /* WKPreferencesPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKPreferencesPrivate.h; sourceTree = "<group>"; };
|
||||
B27EEBDF244D15F2000932E6 /* stylesheet.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = stylesheet.css; sourceTree = "<group>"; };
|
||||
B2B8075D239C49D300F191E0 /* RSImage-AppIcons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RSImage-AppIcons.swift"; sourceTree = "<group>"; };
|
||||
B2C12C6528F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URLPasteboardWriter+NetNewsWire.swift"; sourceTree = "<group>"; };
|
||||
B528F81D23333C7E00E735DD /* page.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = page.html; sourceTree = "<group>"; };
|
||||
BDCB514D24282C8A00102A80 /* AccountsNewsBlur.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AccountsNewsBlur.xib; sourceTree = "<group>"; };
|
||||
C5A6ED5123C9AF4300AB6BE2 /* TitleActivityItemSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleActivityItemSource.swift; sourceTree = "<group>"; };
|
||||
@@ -1595,10 +1600,17 @@
|
||||
D5F4EDB620074D6500B9E363 /* WebFeed+Scriptability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WebFeed+Scriptability.swift"; sourceTree = "<group>"; };
|
||||
D5F4EDB820074D7C00B9E363 /* Folder+Scriptability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+Scriptability.swift"; sourceTree = "<group>"; };
|
||||
DD82AB09231003F6002269DF /* SharingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharingTests.swift; sourceTree = "<group>"; };
|
||||
DDF9E1D628EDF2FC000BC355 /* notificationSoundBlip.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = notificationSoundBlip.mp3; sourceTree = "<group>"; };
|
||||
DF790D6128E990A900455FC7 /* AboutData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutData.swift; sourceTree = "<group>"; };
|
||||
DFC14F0E28EA55BD00F6EE86 /* AboutWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutWindowController.swift; sourceTree = "<group>"; };
|
||||
DFC14F1428EB177000F6EE86 /* AboutNetNewsWireView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutNetNewsWireView.swift; sourceTree = "<group>"; };
|
||||
DFC14F1628EB17A800F6EE86 /* CreditsNetNewsWireView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsNetNewsWireView.swift; sourceTree = "<group>"; };
|
||||
DFCE4F9028EF26F000405869 /* About.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = About.plist; sourceTree = "<group>"; };
|
||||
DFCE4F9328EF278300405869 /* Thanks.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = Thanks.md; sourceTree = "<group>"; };
|
||||
DFD6AACB27ADE80900463FAD /* NewsFax.nnwtheme */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = NewsFax.nnwtheme; sourceTree = "<group>"; };
|
||||
DFD6AACD27ADE86E00463FAD /* NewsFax.nnwtheme */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = NewsFax.nnwtheme; sourceTree = "<group>"; };
|
||||
DFFC199727A0D0D7004B7AEF /* NotificationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsViewController.swift; sourceTree = "<group>"; };
|
||||
DFFC199927A0D32A004B7AEF /* NotificationsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DFFC4E7328E95C01006B82AF /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
|
||||
FF3ABF09232599450074C542 /* ArticleSorterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleSorterTests.swift; sourceTree = "<group>"; };
|
||||
FF3ABF1423259DDB0074C542 /* ArticleSorter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleSorter.swift; sourceTree = "<group>"; };
|
||||
FFD43E372340F320009E5CA3 /* MarkAsReadAlertController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkAsReadAlertController.swift; sourceTree = "<group>"; };
|
||||
@@ -1858,6 +1870,9 @@
|
||||
511D43CE231FA51100FB1562 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DFCE4F9028EF26F000405869 /* About.plist */,
|
||||
DFCE4F9328EF278300405869 /* Thanks.md */,
|
||||
DDF9E1D628EDF2FC000BC355 /* notificationSoundBlip.mp3 */,
|
||||
DFD6AACB27ADE80900463FAD /* NewsFax.nnwtheme */,
|
||||
51DEE81126FB9233006DAA56 /* Appanoose.nnwtheme */,
|
||||
51077C5727A86D16000C71DB /* Hyperlegible.nnwtheme */,
|
||||
@@ -1970,14 +1985,6 @@
|
||||
path = Reddit;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5177C21027B07C8400643901 /* Recovered References */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DFD6AACD27ADE86E00463FAD /* NewsFax.nnwtheme */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5183CCEA226F70350010922C /* Timer */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1991,7 +1998,7 @@
|
||||
5183CCEB227117C70010922C /* Settings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
51A16995235E10D600EB091F /* AboutViewController.swift */,
|
||||
DFFC4E7328E95C01006B82AF /* AboutView.swift */,
|
||||
51A16992235E10D600EB091F /* AddAccountViewController.swift */,
|
||||
519ED455244828C3007F8E94 /* AddExtensionPointViewController.swift */,
|
||||
5137C2E926F63AE6009EFEDB /* ArticleThemeImporter.swift */,
|
||||
@@ -2049,7 +2056,6 @@
|
||||
children = (
|
||||
51F9F3FA23DFB25700A314FD /* Animations.swift */,
|
||||
51F85BFA2275D85000C787DC /* Array-Extensions.swift */,
|
||||
51F85BF42273625800C787DC /* Bundle-Extensions.swift */,
|
||||
51627A92238A3836007B3B4B /* CroppingPreviewParameters.swift */,
|
||||
512AF9C1236ED52C0066F8BE /* ImageHeaderView.swift */,
|
||||
512AF9DC236F05230066F8BE /* InteractiveLabel.swift */,
|
||||
@@ -2058,7 +2064,6 @@
|
||||
5183CCD9226E31A50010922C /* NonIntrinsicImageView.swift */,
|
||||
5183CCCF226E1E880010922C /* NonIntrinsicLabel.swift */,
|
||||
51A9A6092382FD240033AADF /* PoppableGestureRecognizerDelegate.swift */,
|
||||
512363372369155100951F16 /* RoundedProgressView.swift */,
|
||||
51C45250226506F400C03939 /* String-Extensions.swift */,
|
||||
5108F6D723763094001ABC45 /* TickMarkSlider.swift */,
|
||||
C5A6ED6C23C9B0C800AB6BE2 /* UIActivityViewController-Extensions.swift */,
|
||||
@@ -2081,8 +2086,7 @@
|
||||
51C45264226508F600C03939 /* MasterFeedViewController.swift */,
|
||||
51627A6623861DA3007B3B4B /* MasterFeedViewController+Drag.swift */,
|
||||
51627A6823861DED007B3B4B /* MasterFeedViewController+Drop.swift */,
|
||||
51CE1C0A23622006005548FC /* RefreshProgressView.swift */,
|
||||
51CE1C0823621EDA005548FC /* RefreshProgressView.xib */,
|
||||
51D5D114291EEDC600AA1278 /* RefreshProgressView.swift */,
|
||||
5195C1D92720205F00888867 /* ShadowTableChanges.swift */,
|
||||
51C45260226508F600C03939 /* Cell */,
|
||||
);
|
||||
@@ -2260,6 +2264,7 @@
|
||||
842E45E11ED8C681000A8B52 /* MainWindow */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DFC14F0928EA51AB00F6EE86 /* About */,
|
||||
8483630C2262A3FE00DA1D35 /* MainWindow.storyboard */,
|
||||
51927A0328E28D1C000AE856 /* MainWindow.swift */,
|
||||
519279FD28E24CCA000AE856 /* MainWindowController.swift */,
|
||||
@@ -2268,6 +2273,7 @@
|
||||
5117715424E1EA0F00A2A836 /* ArticleExtractorButton.swift */,
|
||||
51FA73B62332D5F70090D516 /* LegacyArticleExtractorButton.swift */,
|
||||
847CD6C9232F4CBF00FAC46D /* IconView.swift */,
|
||||
B2C12C6528F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift */,
|
||||
844B5B6B1FEA224B00C7C76A /* Keyboard */,
|
||||
849A975F1ED9EB95007D329B /* Sidebar */,
|
||||
849A97681ED9EBC8007D329B /* Timeline */,
|
||||
@@ -2398,6 +2404,7 @@
|
||||
51A66684238075AE00CB272D /* AddWebFeedDefaultContainer.swift */,
|
||||
849A97731ED9EC04007D329B /* ArticleStringFormatter.swift */,
|
||||
849A97581ED9EB0D007D329B /* ArticleUtilities.swift */,
|
||||
51F85BF42273625800C787DC /* Bundle-Extensions.swift */,
|
||||
5108F6B52375E612001ABC45 /* CacheCleaner.swift */,
|
||||
516AE9DE2372269A007DEEAA /* IconImage.swift */,
|
||||
849A97971ED9EFAA007D329B /* Node-Extensions.swift */,
|
||||
@@ -2512,7 +2519,6 @@
|
||||
51CD32C324D2CD57009ABAEF /* ArticlesDatabase */,
|
||||
51CD32C724D2E06C009ABAEF /* Secrets */,
|
||||
51CD32A824D2CB25009ABAEF /* SyncDatabase */,
|
||||
5177C21027B07C8400643901 /* Recovered References */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
usesTabs = 1;
|
||||
@@ -2585,6 +2591,7 @@
|
||||
84C9FC6822629C9A00D921D6 /* Shared */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DF790D6128E990A900455FC7 /* AboutData.swift */,
|
||||
842E45CD1ED8C308000A8B52 /* AppNotifications.swift */,
|
||||
51C4CFEF24D37D1F00AF9874 /* Secrets.swift */,
|
||||
511B9805237DCAC90028BCAA /* UserInfoKey.swift */,
|
||||
@@ -2673,6 +2680,7 @@
|
||||
children = (
|
||||
849C64671ED37A5D003D8FC0 /* Assets.xcassets */,
|
||||
84C9FC8922629E8F00D921D6 /* Credits.rtf */,
|
||||
B20180AA28E3B76F0059686A /* Localizable.stringsdict */,
|
||||
84C9FC8A22629E8F00D921D6 /* NetNewsWire.sdef */,
|
||||
84C9FC9022629ECB00D921D6 /* NetNewsWire.entitlements */,
|
||||
51F805D32428499E0022C792 /* NetNewsWire-dev.entitlements */,
|
||||
@@ -2731,10 +2739,6 @@
|
||||
84C9FC9A2262A1A900D921D6 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
51F85BEA22724CB600C787DC /* About.rtf */,
|
||||
51F85BF02272524100C787DC /* Credits.rtf */,
|
||||
51F85BEE2272520B00C787DC /* Thanks.rtf */,
|
||||
51F85BF22272531500C787DC /* Dedication.rtf */,
|
||||
5103A9B324216A4200410853 /* blank.html */,
|
||||
51BB7C302335ACDE008E8144 /* page.html */,
|
||||
514219572353C28900E07E2C /* main_ios.js */,
|
||||
@@ -2876,6 +2880,16 @@
|
||||
path = Scriptability;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DFC14F0928EA51AB00F6EE86 /* About */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DFC14F0E28EA55BD00F6EE86 /* AboutWindowController.swift */,
|
||||
DFC14F1428EB177000F6EE86 /* AboutNetNewsWireView.swift */,
|
||||
DFC14F1628EB17A800F6EE86 /* CreditsNetNewsWireView.swift */,
|
||||
);
|
||||
path = About;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -3389,13 +3403,13 @@
|
||||
65ED405D235DEF6C0081F399 /* SidebarKeyboardShortcuts.plist in Resources */,
|
||||
514A89A3244FD63F0085E65D /* AddTwitterFeedSheet.xib in Resources */,
|
||||
51D0214726ED617100FF2E0F /* core.css in Resources */,
|
||||
DDF9E1D828EDF2FC000BC355 /* notificationSoundBlip.mp3 in Resources */,
|
||||
5103A9F5242258C600410853 /* AccountsAddCloudKit.xib in Resources */,
|
||||
65ED405E235DEF6C0081F399 /* DefaultFeeds.opml in Resources */,
|
||||
51333D3C2468615D00EB5C91 /* AddRedditFeedSheet.xib in Resources */,
|
||||
65ED405F235DEF6C0081F399 /* Preferences.storyboard in Resources */,
|
||||
65ED4061235DEF6C0081F399 /* Assets.xcassets in Resources */,
|
||||
65ED4063235DEF6C0081F399 /* RenameSheet.xib in Resources */,
|
||||
DFD6AACF27ADE86E00463FAD /* NewsFax.nnwtheme in Resources */,
|
||||
5177C21227B07C9E00643901 /* NewsFax.nnwtheme in Resources */,
|
||||
65ED4064235DEF6C0081F399 /* AddFolderSheet.xib in Resources */,
|
||||
65ED4065235DEF6C0081F399 /* AccountsFeedbin.xib in Resources */,
|
||||
@@ -3431,6 +3445,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DFCE4F9228EF26F100405869 /* About.plist in Resources */,
|
||||
5137C2E626F3F52D009EFEDB /* Sepia.nnwtheme in Resources */,
|
||||
517630052336215100E15FFF /* main.js in Resources */,
|
||||
5148F44B2336DB4700F8CD8B /* MasterTimelineTitleView.xib in Resources */,
|
||||
@@ -3442,31 +3457,28 @@
|
||||
51BB7C312335ACDE008E8144 /* page.html in Resources */,
|
||||
512392C324E3451400F11704 /* TwitterAdd.storyboard in Resources */,
|
||||
516A093723609A3600EAE89B /* SettingsComboTableViewCell.xib in Resources */,
|
||||
51F85BF32272531500C787DC /* Dedication.rtf in Resources */,
|
||||
51077C5A27A86D16000C71DB /* Hyperlegible.nnwtheme in Resources */,
|
||||
516A09422361248000EAE89B /* Inspector.storyboard in Resources */,
|
||||
DDF9E1D928EDF2FC000BC355 /* notificationSoundBlip.mp3 in Resources */,
|
||||
51DEE81A26FBFF84006DAA56 /* Promenade.nnwtheme in Resources */,
|
||||
1768140B2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig in Resources */,
|
||||
5103A9B424216A4200410853 /* blank.html in Resources */,
|
||||
51D0214826ED617100FF2E0F /* core.css in Resources */,
|
||||
84C9FCA42262A1B800D921D6 /* LaunchScreenPhone.storyboard in Resources */,
|
||||
51F85BEB22724CB600C787DC /* About.rtf in Resources */,
|
||||
516A093B2360A4A000EAE89B /* SettingsTableViewCell.xib in Resources */,
|
||||
511D43D1231FA62800FB1562 /* SidebarKeyboardShortcuts.plist in Resources */,
|
||||
516A09402361240900EAE89B /* Account.storyboard in Resources */,
|
||||
51C452AB22650DC600C03939 /* template.html in Resources */,
|
||||
51F85BF12272524100C787DC /* Credits.rtf in Resources */,
|
||||
84A3EE61223B667F00557320 /* DefaultFeeds.opml in Resources */,
|
||||
B27EEBFB244D15F3000932E6 /* stylesheet.css in Resources */,
|
||||
511D43CF231FA62200FB1562 /* DetailKeyboardShortcuts.plist in Resources */,
|
||||
51A1699A235E10D700EB091F /* Settings.storyboard in Resources */,
|
||||
49F40DF92335B71000552BF4 /* newsfoot.js in Resources */,
|
||||
512392C024E33A3C00F11704 /* RedditAdd.storyboard in Resources */,
|
||||
51F85BEF2272520B00C787DC /* Thanks.rtf in Resources */,
|
||||
5177C21327B07CFE00643901 /* NewsFax.nnwtheme in Resources */,
|
||||
51CE1C0923621EDA005548FC /* RefreshProgressView.xib in Resources */,
|
||||
84C9FC9D2262A1A900D921D6 /* Assets.xcassets in Resources */,
|
||||
514219582353C28900E07E2C /* main_ios.js in Resources */,
|
||||
DFCE4F9528EF278300405869 /* Thanks.md in Resources */,
|
||||
51DEE81426FB9233006DAA56 /* Appanoose.nnwtheme in Resources */,
|
||||
51E36E8C239D6765006F47A5 /* AddFeedSelectFolderTableViewCell.xib in Resources */,
|
||||
);
|
||||
@@ -3491,10 +3503,12 @@
|
||||
51D0214626ED617100FF2E0F /* core.css in Resources */,
|
||||
51DEE81826FBFF84006DAA56 /* Promenade.nnwtheme in Resources */,
|
||||
5142194B2353C1CF00E07E2C /* main_mac.js in Resources */,
|
||||
DFCE4F9128EF26F100405869 /* About.plist in Resources */,
|
||||
84C9FC8C22629E8F00D921D6 /* KeyboardShortcuts.html in Resources */,
|
||||
B27EEBF9244D15F3000932E6 /* stylesheet.css in Resources */,
|
||||
5144EA3B227A379E00D19003 /* ImportOPMLSheet.xib in Resources */,
|
||||
844B5B691FEA20DF00C7C76A /* SidebarKeyboardShortcuts.plist in Resources */,
|
||||
DDF9E1D728EDF2FC000BC355 /* notificationSoundBlip.mp3 in Resources */,
|
||||
5103A9F4242258C600410853 /* AccountsAddCloudKit.xib in Resources */,
|
||||
51077C5827A86D16000C71DB /* Hyperlegible.nnwtheme in Resources */,
|
||||
84A3EE5F223B667F00557320 /* DefaultFeeds.opml in Resources */,
|
||||
@@ -3514,12 +3528,14 @@
|
||||
BDCB516724282C8A00102A80 /* AccountsNewsBlur.xib in Resources */,
|
||||
514A89A2244FD63F0085E65D /* AddTwitterFeedSheet.xib in Resources */,
|
||||
5103A9982421643300410853 /* blank.html in Resources */,
|
||||
B20180AB28E3B76F0059686A /* Localizable.stringsdict in Resources */,
|
||||
515A516E243E7F950089E588 /* ExtensionPointDetail.xib in Resources */,
|
||||
84BAE64921CEDAF20046DB56 /* CrashReporterWindow.xib in Resources */,
|
||||
51DEE81226FB9233006DAA56 /* Appanoose.nnwtheme in Resources */,
|
||||
84C9FC8E22629E8F00D921D6 /* Credits.rtf in Resources */,
|
||||
84BBB12D20142A4700F054F5 /* Inspector.storyboard in Resources */,
|
||||
848363022262A3BD00DA1D35 /* AddWebFeedSheet.xib in Resources */,
|
||||
DFCE4F9428EF278300405869 /* Thanks.md in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -3862,6 +3878,7 @@
|
||||
65ED3FD0235DEF6C0081F399 /* Author+Scriptability.swift in Sources */,
|
||||
65ED3FD1235DEF6C0081F399 /* PseudoFeed.swift in Sources */,
|
||||
65ED3FD3235DEF6C0081F399 /* NSScriptCommand+NetNewsWire.swift in Sources */,
|
||||
B2C12C6728F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift in Sources */,
|
||||
65ED3FD4235DEF6C0081F399 /* Article+Scriptability.swift in Sources */,
|
||||
515A5172243E802B0089E588 /* ExtensionPointDetailViewController.swift in Sources */,
|
||||
65ED3FD5235DEF6C0081F399 /* SmartFeed.swift in Sources */,
|
||||
@@ -3917,6 +3934,7 @@
|
||||
65ED3FFA235DEF6C0081F399 /* WebFeedInspectorViewController.swift in Sources */,
|
||||
65ED3FFB235DEF6C0081F399 /* AccountsReaderAPIWindowController.swift in Sources */,
|
||||
65ED3FFC235DEF6C0081F399 /* AccountsAddLocalWindowController.swift in Sources */,
|
||||
514217062921C9DD00963F14 /* Bundle-Extensions.swift in Sources */,
|
||||
65ED3FFD235DEF6C0081F399 /* PasteboardFolder.swift in Sources */,
|
||||
51386A8F25673277005F3762 /* AccountCell.swift in Sources */,
|
||||
65ED3FFE235DEF6C0081F399 /* AccountsFeedbinWindowController.swift in Sources */,
|
||||
@@ -4022,7 +4040,6 @@
|
||||
51E36E71239D6610006F47A5 /* AddFeedSelectFolderTableViewCell.swift in Sources */,
|
||||
512DD4C92430086400C17B1F /* CloudKitAccountViewController.swift in Sources */,
|
||||
840D617F2029031C009BC708 /* AppDelegate.swift in Sources */,
|
||||
51236339236915B100951F16 /* RoundedProgressView.swift in Sources */,
|
||||
512E08E72268801200BDCFDD /* WebFeedTreeControllerDelegate.swift in Sources */,
|
||||
51C452A422650A2D00C03939 /* ArticleUtilities.swift in Sources */,
|
||||
51EF0F79227716380050506E /* ColorHash.swift in Sources */,
|
||||
@@ -4071,6 +4088,7 @@
|
||||
51C4525C226508DF00C03939 /* String-Extensions.swift in Sources */,
|
||||
51F9F3F923DFB16300A314FD /* UITableView-Extensions.swift in Sources */,
|
||||
51C452792265091600C03939 /* MasterTimelineTableViewCell.swift in Sources */,
|
||||
DFFC4E7428E95C01006B82AF /* AboutView.swift in Sources */,
|
||||
51C4526B226508F600C03939 /* MasterFeedViewController.swift in Sources */,
|
||||
5126EE97226CB48A00C22AFC /* SceneCoordinator.swift in Sources */,
|
||||
84CAFCB022BC8C35007694F0 /* FetchRequestOperation.swift in Sources */,
|
||||
@@ -4081,6 +4099,7 @@
|
||||
517A745B2443665000B553B9 /* UIPageViewController-Extensions.swift in Sources */,
|
||||
51BB7C272335A8E5008E8144 /* ArticleActivityItemSource.swift in Sources */,
|
||||
51F85BF52273625800C787DC /* Bundle-Extensions.swift in Sources */,
|
||||
DF790D6228E990A900455FC7 /* AboutData.swift in Sources */,
|
||||
177A0C2D25454AAB00D7EAF6 /* ReaderAPIAccountViewController.swift in Sources */,
|
||||
51C452A622650A3500C03939 /* Node-Extensions.swift in Sources */,
|
||||
51C45294226509C800C03939 /* SearchFeedDelegate.swift in Sources */,
|
||||
@@ -4119,6 +4138,7 @@
|
||||
51EF0F802277A8330050506E /* MasterTimelineCellLayout.swift in Sources */,
|
||||
51F85BF722749FA100C787DC /* UIFont-Extensions.swift in Sources */,
|
||||
51C452AF2265108300C03939 /* ArticleArray.swift in Sources */,
|
||||
51D5D116291EEF5600AA1278 /* RefreshProgressView.swift in Sources */,
|
||||
51C4528E2265099C00C03939 /* SmartFeedsController.swift in Sources */,
|
||||
51C9DE5823EA2EF4003D5A6D /* WrapperScriptMessageHandler.swift in Sources */,
|
||||
51B5C87D23F2346200032075 /* ExtensionContainersFile.swift in Sources */,
|
||||
@@ -4137,7 +4157,6 @@
|
||||
512AF9C2236ED52C0066F8BE /* ImageHeaderView.swift in Sources */,
|
||||
512392C124E33A3C00F11704 /* RedditSelectTypeTableViewController.swift in Sources */,
|
||||
515A5181243E90260089E588 /* ExtensionPointIdentifer.swift in Sources */,
|
||||
51A1699F235E10D700EB091F /* AboutViewController.swift in Sources */,
|
||||
51C45290226509C100C03939 /* PseudoFeed.swift in Sources */,
|
||||
512392C624E3451400F11704 /* TwitterSelectAccountTableViewController.swift in Sources */,
|
||||
51C452A922650DC600C03939 /* ArticleRenderer.swift in Sources */,
|
||||
@@ -4194,7 +4213,6 @@
|
||||
51FFF0C4235EE8E5002762AA /* VibrantButton.swift in Sources */,
|
||||
51C45259226508D300C03939 /* AppDefaults.swift in Sources */,
|
||||
510FFAB326EEA22C00F32265 /* ArticleThemesTableViewController.swift in Sources */,
|
||||
51CE1C0B23622007005548FC /* RefreshProgressView.swift in Sources */,
|
||||
511D4419231FC02D00FB1562 /* KeyboardManager.swift in Sources */,
|
||||
51A1699D235E10D700EB091F /* SettingsViewController.swift in Sources */,
|
||||
51C45293226509C800C03939 /* StarredFeedDelegate.swift in Sources */,
|
||||
@@ -4212,6 +4230,7 @@
|
||||
848B937221C8C5540038DC0D /* CrashReporter.swift in Sources */,
|
||||
515A5171243E802B0089E588 /* ExtensionPointDetailViewController.swift in Sources */,
|
||||
847CD6CA232F4CBF00FAC46D /* IconView.swift in Sources */,
|
||||
B2C12C6628F4C46800373730 /* URLPasteboardWriter+NetNewsWire.swift in Sources */,
|
||||
84BBB12E20142A4700F054F5 /* InspectorWindowController.swift in Sources */,
|
||||
51EF0F7A22771B890050506E /* ColorHash.swift in Sources */,
|
||||
84E46C7D1F75EF7B005ECFB3 /* AppDefaults.swift in Sources */,
|
||||
@@ -4301,6 +4320,7 @@
|
||||
845A29241FC9255E007B49E3 /* SidebarCellAppearance.swift in Sources */,
|
||||
515A5107243D0CCD0089E588 /* TwitterFeedProvider-Extensions.swift in Sources */,
|
||||
845EE7B11FC2366500854A1F /* StarredFeedDelegate.swift in Sources */,
|
||||
DFC14F1228EA5DC500F6EE86 /* AboutData.swift in Sources */,
|
||||
848F6AE51FC29CFB002D422E /* FaviconDownloader.swift in Sources */,
|
||||
511B9806237DCAC90028BCAA /* UserInfoKey.swift in Sources */,
|
||||
84C9FC7722629E1200D921D6 /* AdvancedPreferencesViewController.swift in Sources */,
|
||||
@@ -4328,12 +4348,15 @@
|
||||
849A97801ED9EC42007D329B /* DetailViewController.swift in Sources */,
|
||||
173A64172547BE0900267F6E /* AccountType+Helpers.swift in Sources */,
|
||||
518C3193237B00D9004D740F /* DetailIconSchemeHandler.swift in Sources */,
|
||||
DFC14F1528EB177000F6EE86 /* AboutNetNewsWireView.swift in Sources */,
|
||||
84C9FC6722629B9000D921D6 /* AppDelegate.swift in Sources */,
|
||||
510C417F24E5D1AE008226FD /* ExtensionContainersFile.swift in Sources */,
|
||||
84C9FC7A22629E1200D921D6 /* PreferencesTableViewBackgroundView.swift in Sources */,
|
||||
84CAFCAF22BC8C35007694F0 /* FetchRequestOperation.swift in Sources */,
|
||||
DFC14F1328EA677C00F6EE86 /* Bundle-Extensions.swift in Sources */,
|
||||
8426119E1FCB6ED40086A189 /* HTMLMetadataDownloader.swift in Sources */,
|
||||
849A976E1ED9EBC8007D329B /* TimelineViewController.swift in Sources */,
|
||||
DFC14F1728EB17A800F6EE86 /* CreditsNetNewsWireView.swift in Sources */,
|
||||
5154368B229404D1005E1CDF /* FaviconGenerator.swift in Sources */,
|
||||
5183CCE6226F4E110010922C /* RefreshInterval.swift in Sources */,
|
||||
849A97771ED9EC04007D329B /* TimelineCellData.swift in Sources */,
|
||||
@@ -4342,6 +4365,7 @@
|
||||
8454C3F8263F3AD400E3F9C7 /* IconImageCache.swift in Sources */,
|
||||
518651B223555EB20078E021 /* NNW3Document.swift in Sources */,
|
||||
D5F4EDB5200744A700B9E363 /* ScriptingObject.swift in Sources */,
|
||||
DFC14F0F28EA55BD00F6EE86 /* AboutWindowController.swift in Sources */,
|
||||
D5F4EDB920074D7C00B9E363 /* Folder+Scriptability.swift in Sources */,
|
||||
849A97781ED9EC04007D329B /* TimelineCellLayout.swift in Sources */,
|
||||
84E8E0EB202F693600562D8F /* DetailWebView.swift in Sources */,
|
||||
@@ -4922,7 +4946,7 @@
|
||||
repositoryURL = "https://github.com/Ranchero-Software/RSCore.git";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.0.0;
|
||||
minimumVersion = 1.1.0;
|
||||
};
|
||||
};
|
||||
510ECA4024D1DCD0001C31A6 /* XCRemoteSwiftPackageReference "RSTree" */ = {
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
"repositoryURL": "https://github.com/microsoft/plcrashreporter.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "81cdec2b3827feb03286cb297f4c501a8eb98df1",
|
||||
"version": "1.10.2"
|
||||
"revision": "b1a342da19ed9b3af61ea2efa7656c2af30aeb7c",
|
||||
"version": "1.11.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -60,8 +60,8 @@
|
||||
"repositoryURL": "https://github.com/Ranchero-Software/RSCore.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "4425a29db97b97c44e9ebee16e6090b116b10055",
|
||||
"version": "1.0.14"
|
||||
"revision": "fd64fb77de2c4b6a87a971d353e7eea75100f694",
|
||||
"version": "1.1.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -96,8 +96,8 @@
|
||||
"repositoryURL": "https://github.com/Ranchero-Software/RSWeb.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "2f7849a9ad2cb461b3d6c9c920e163596e6b5d7b",
|
||||
"version": "1.0.3"
|
||||
"revision": "c8d6212b08ae86142105e828fda391a6503a2ea7",
|
||||
"version": "1.0.6"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// AboutData.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Stuart Breckenridge on 02/10/2022.
|
||||
// Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@available(iOS 15, *)
|
||||
@available(macOS 12, *)
|
||||
protocol LoadableAboutData {
|
||||
var about: AboutData { get }
|
||||
}
|
||||
|
||||
@available(iOS 15, *)
|
||||
@available(macOS 12, *)
|
||||
extension LoadableAboutData {
|
||||
|
||||
var about: AboutData {
|
||||
guard let path = Bundle.main.path(forResource: "About", ofType: "plist") else {
|
||||
fatalError("The about plist really should exist.")
|
||||
}
|
||||
let url = URL(fileURLWithPath: path)
|
||||
let data = try! Data(contentsOf: url)
|
||||
return try! PropertyListDecoder().decode(AboutData.self, from: data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@available(iOS 15, *)
|
||||
@available(macOS 12, *)
|
||||
struct AboutData: Codable {
|
||||
var PrimaryContributors: [Contributor]
|
||||
var AdditionalContributors: [Contributor]
|
||||
|
||||
var ThanksMarkdown: AttributedString {
|
||||
let dataURL = Bundle.main.url(forResource: "Thanks", withExtension: "md")!
|
||||
return try! AttributedString(markdown: Data(contentsOf: dataURL), options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace))
|
||||
}
|
||||
|
||||
struct Contributor: Codable {
|
||||
var name: String
|
||||
var url: String?
|
||||
var role: String?
|
||||
}
|
||||
}
|
||||
@@ -219,6 +219,10 @@ img, figure, video, div, object {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -11,5 +11,4 @@ import Foundation
|
||||
extension Notification.Name {
|
||||
static let didBeginDownloadingTheme = Notification.Name("didBeginDownloadingTheme")
|
||||
static let didEndDownloadingTheme = Notification.Name("didEndDownloadingTheme")
|
||||
static let didFailToImportThemeWithError = Notification.Name("didFailToImportThemeWithError")
|
||||
}
|
||||
@@ -30,20 +30,30 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
|
||||
}
|
||||
set {
|
||||
if newValue != currentThemeName {
|
||||
AppDefaults.shared.currentThemeName = newValue
|
||||
updateThemeNames()
|
||||
updateCurrentTheme()
|
||||
do {
|
||||
currentTheme = try articleThemeWithThemeName(newValue)
|
||||
AppDefaults.shared.currentThemeName = newValue
|
||||
} catch {
|
||||
logger.error("Unable to set new theme: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var currentTheme: ArticleTheme {
|
||||
lazy var currentTheme = {
|
||||
do {
|
||||
return try articleThemeWithThemeName(currentThemeName)
|
||||
} catch {
|
||||
logger.error("Unable to load theme \(self.currentThemeName): \(error.localizedDescription, privacy: .public)")
|
||||
return ArticleTheme.defaultTheme
|
||||
}
|
||||
}() {
|
||||
didSet {
|
||||
NotificationCenter.default.post(name: .CurrentArticleThemeDidChangeNotification, object: self)
|
||||
}
|
||||
}
|
||||
|
||||
var themeNames = [AppDefaults.defaultThemeName] {
|
||||
lazy var themeNames = { buildThemeNames() }() {
|
||||
didSet {
|
||||
NotificationCenter.default.post(name: .ArticleThemeNamesDidChangeNotification, object: self)
|
||||
}
|
||||
@@ -51,7 +61,6 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
|
||||
|
||||
init(folderPath: String) {
|
||||
self.folderPath = folderPath
|
||||
self.currentTheme = ArticleTheme.defaultTheme
|
||||
|
||||
super.init()
|
||||
|
||||
@@ -63,15 +72,16 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
|
||||
abort()
|
||||
}
|
||||
|
||||
updateThemeNames()
|
||||
updateCurrentTheme()
|
||||
|
||||
NSFileCoordinator.addFilePresenter(self)
|
||||
}
|
||||
|
||||
func presentedSubitemDidChange(at url: URL) {
|
||||
updateThemeNames()
|
||||
updateCurrentTheme()
|
||||
themeNames = buildThemeNames()
|
||||
do {
|
||||
currentTheme = try articleThemeWithThemeName(currentThemeName)
|
||||
} catch {
|
||||
appDelegate.presentThemeImportError(error)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: API
|
||||
@@ -93,7 +103,7 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
|
||||
try FileManager.default.copyItem(atPath: filename, toPath: toFilename)
|
||||
}
|
||||
|
||||
func articleThemeWithThemeName(_ themeName: String) -> ArticleTheme? {
|
||||
func articleThemeWithThemeName(_ themeName: String) throws -> ArticleTheme {
|
||||
if themeName == AppDefaults.defaultThemeName {
|
||||
return ArticleTheme.defaultTheme
|
||||
}
|
||||
@@ -107,17 +117,10 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
|
||||
path = installedPath
|
||||
isAppTheme = false
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
do {
|
||||
return try ArticleTheme(path: path, isAppTheme: isAppTheme)
|
||||
} catch {
|
||||
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
|
||||
logger.error("Failed to import theme: \(error.localizedDescription, privacy: .public)")
|
||||
return nil
|
||||
return ArticleTheme.defaultTheme
|
||||
}
|
||||
|
||||
return try ArticleTheme(path: path, isAppTheme: isAppTheme)
|
||||
}
|
||||
|
||||
func deleteTheme(themeName: String) {
|
||||
@@ -132,7 +135,7 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
|
||||
|
||||
private extension ArticleThemesManager {
|
||||
|
||||
func updateThemeNames() {
|
||||
func buildThemeNames() -> [String] {
|
||||
let appThemeFilenames = Bundle.main.paths(forResourcesOfType: ArticleTheme.nnwThemeSuffix, inDirectory: nil)
|
||||
let appThemeNames = Set(appThemeFilenames.map { ArticleTheme.themeNameForPath($0) })
|
||||
|
||||
@@ -140,32 +143,7 @@ private extension ArticleThemesManager {
|
||||
|
||||
let allThemeNames = appThemeNames.union(installedThemeNames)
|
||||
|
||||
let sortedThemeNames = allThemeNames.sorted(by: { $0.compare($1, options: .caseInsensitive) == .orderedAscending })
|
||||
if sortedThemeNames != themeNames {
|
||||
themeNames = sortedThemeNames
|
||||
}
|
||||
}
|
||||
|
||||
func defaultArticleTheme() -> ArticleTheme {
|
||||
return articleThemeWithThemeName(AppDefaults.defaultThemeName)!
|
||||
}
|
||||
|
||||
func updateCurrentTheme() {
|
||||
var themeName = currentThemeName
|
||||
if !themeNames.contains(themeName) {
|
||||
themeName = AppDefaults.defaultThemeName
|
||||
currentThemeName = AppDefaults.defaultThemeName
|
||||
}
|
||||
|
||||
var articleTheme = articleThemeWithThemeName(themeName)
|
||||
if articleTheme == nil {
|
||||
articleTheme = defaultArticleTheme()
|
||||
currentThemeName = AppDefaults.defaultThemeName
|
||||
}
|
||||
|
||||
if let articleTheme = articleTheme, articleTheme != currentTheme {
|
||||
currentTheme = articleTheme
|
||||
}
|
||||
return allThemeNames.sorted(by: { $0.localizedStandardCompare($1) == .orderedAscending })
|
||||
}
|
||||
|
||||
func allThemePaths(_ folder: String) -> [String] {
|
||||
|
||||
@@ -8,9 +8,20 @@
|
||||
|
||||
import Foundation
|
||||
import RSCore
|
||||
import Account
|
||||
import Articles
|
||||
|
||||
// Mark articles read/unread, starred/unstarred, deleted/undeleted.
|
||||
//
|
||||
// Directly marked articles are ones that were statused by selecting with a cursor or were selected by group.
|
||||
// Indirectly marked articles didn't have any focus and were picked up using a Mark All command like Mark All as Read.
|
||||
//
|
||||
// See discussion for details: https://github.com/Ranchero-Software/NetNewsWire/issues/3734
|
||||
|
||||
public extension Notification.Name {
|
||||
static let MarkStatusCommandDidDirectMarking = Notification.Name("MarkStatusCommandDid√DirectMarking")
|
||||
static let MarkStatusCommandDidUndoDirectMarking = Notification.Name("MarkStatusCommandDidUndoDirectMarking")
|
||||
}
|
||||
|
||||
final class MarkStatusCommand: UndoableCommand {
|
||||
|
||||
@@ -19,10 +30,11 @@ final class MarkStatusCommand: UndoableCommand {
|
||||
let articles: Set<Article>
|
||||
let undoManager: UndoManager
|
||||
let flag: Bool
|
||||
let directlyMarked: Bool
|
||||
let statusKey: ArticleStatus.Key
|
||||
var completion: (() -> Void)? = nil
|
||||
|
||||
init?(initialArticles: [Article], statusKey: ArticleStatus.Key, flag: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
init?(initialArticles: Set<Article>, statusKey: ArticleStatus.Key, flag: Bool, directlyMarked: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
|
||||
// Filter out articles that already have the desired status or can't be marked.
|
||||
let articlesToMark = MarkStatusCommand.filteredArticles(initialArticles, statusKey, flag)
|
||||
@@ -30,8 +42,9 @@ final class MarkStatusCommand: UndoableCommand {
|
||||
completion?()
|
||||
return nil
|
||||
}
|
||||
self.articles = Set(articlesToMark)
|
||||
self.articles = articlesToMark
|
||||
|
||||
self.directlyMarked = directlyMarked
|
||||
self.flag = flag
|
||||
self.statusKey = statusKey
|
||||
self.undoManager = undoManager
|
||||
@@ -42,21 +55,39 @@ final class MarkStatusCommand: UndoableCommand {
|
||||
self.redoActionName = actionName
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: [Article], markingRead: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .read, flag: markingRead, undoManager: undoManager, completion: completion)
|
||||
convenience init?(initialArticles: [Article], statusKey: ArticleStatus.Key, flag: Bool, directlyMarked: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: Set(initialArticles), statusKey: .read, flag: flag, directlyMarked: directlyMarked, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: [Article], markingStarred: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .starred, flag: markingStarred, undoManager: undoManager, completion: completion)
|
||||
convenience init?(initialArticles: Set<Article>, markingRead: Bool, directlyMarked: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .read, flag: markingRead, directlyMarked: directlyMarked, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: [Article], markingRead: Bool, directlyMarked: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .read, flag: markingRead, directlyMarked: directlyMarked, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: Set<Article>, markingStarred: Bool, directlyMarked: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .starred, flag: markingStarred, directlyMarked: directlyMarked, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: [Article], markingStarred: Bool, directlyMarked: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .starred, flag: markingStarred, directlyMarked: directlyMarked, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
func perform() {
|
||||
mark(statusKey, flag)
|
||||
if directlyMarked {
|
||||
markStatusCommandDidDirectMarking()
|
||||
}
|
||||
registerUndo()
|
||||
}
|
||||
|
||||
func undo() {
|
||||
mark(statusKey, !flag)
|
||||
if directlyMarked {
|
||||
markStatusCommandDidUndoDirectMarking()
|
||||
}
|
||||
registerRedo()
|
||||
}
|
||||
}
|
||||
@@ -67,6 +98,18 @@ private extension MarkStatusCommand {
|
||||
markArticles(articles, statusKey: statusKey, flag: flag, completion: completion)
|
||||
completion = nil
|
||||
}
|
||||
|
||||
func markStatusCommandDidDirectMarking() {
|
||||
NotificationCenter.default.post(name: .MarkStatusCommandDidDirectMarking, object: self, userInfo: [Account.UserInfoKey.articles: articles,
|
||||
Account.UserInfoKey.statusKey: statusKey,
|
||||
Account.UserInfoKey.statusFlag: flag])
|
||||
}
|
||||
|
||||
func markStatusCommandDidUndoDirectMarking() {
|
||||
NotificationCenter.default.post(name: .MarkStatusCommandDidUndoDirectMarking, object: self, userInfo: [Account.UserInfoKey.articles: articles,
|
||||
Account.UserInfoKey.statusKey: statusKey,
|
||||
Account.UserInfoKey.statusFlag: flag])
|
||||
}
|
||||
|
||||
static private let markReadActionName = NSLocalizedString("Mark Read", comment: "command")
|
||||
static private let markUnreadActionName = NSLocalizedString("Mark Unread", comment: "command")
|
||||
@@ -83,7 +126,7 @@ private extension MarkStatusCommand {
|
||||
}
|
||||
}
|
||||
|
||||
static func filteredArticles(_ articles: [Article], _ statusKey: ArticleStatus.Key, _ flag: Bool) -> [Article] {
|
||||
static func filteredArticles(_ articles: Set<Article>, _ statusKey: ArticleStatus.Key, _ flag: Bool) -> Set<Article> {
|
||||
|
||||
return articles.filter{ article in
|
||||
guard article.status.boolStatus(forKey: statusKey) != flag else { return false }
|
||||
@@ -93,4 +136,5 @@ private extension MarkStatusCommand {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import Account
|
||||
// These handle multiple accounts.
|
||||
|
||||
func markArticles(_ articles: Set<Article>, statusKey: ArticleStatus.Key, flag: Bool, completion: (() -> Void)? = nil) {
|
||||
|
||||
let d: [String: Set<Article>] = accountAndArticlesDictionary(articles)
|
||||
|
||||
let group = DispatchGroup()
|
||||
@@ -24,7 +23,7 @@ func markArticles(_ articles: Set<Article>, statusKey: ArticleStatus.Key, flag:
|
||||
continue
|
||||
}
|
||||
group.enter()
|
||||
account.markArticles(accountArticles, statusKey: statusKey, flag: flag) { _ in
|
||||
account.mark(articles: accountArticles, statusKey: statusKey, flag: flag) { _ in
|
||||
group.leave()
|
||||
}
|
||||
}
|
||||
|
||||
File renamed without changes.
@@ -23,23 +23,7 @@ struct CacheCleaner: Logging {
|
||||
if flushDate.addingTimeInterval(3600 * 24 * 3) < Date() {
|
||||
if let reachability = try? Reachability(hostname: "apple.com") {
|
||||
if reachability.connection != .unavailable {
|
||||
|
||||
let tempDir = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!
|
||||
let faviconsFolderURL = tempDir.appendingPathComponent("Favicons")
|
||||
let imagesFolderURL = tempDir.appendingPathComponent("Images")
|
||||
let feedURLToIconURL = tempDir.appendingPathComponent("FeedURLToIconURLCache.plist")
|
||||
let homePageToIconURL = tempDir.appendingPathComponent("HomePageToIconURLCache.plist")
|
||||
let homePagesWithNoIconURL = tempDir.appendingPathComponent("HomePagesWithNoIconURLCache.plist")
|
||||
|
||||
for tempItem in [faviconsFolderURL, imagesFolderURL, feedURLToIconURL, homePageToIconURL, homePagesWithNoIconURL] {
|
||||
do {
|
||||
CacheCleaner.logger.info("Removing cache file: \(tempItem.absoluteString, privacy: .public)")
|
||||
try FileManager.default.removeItem(at: tempItem)
|
||||
} catch {
|
||||
CacheCleaner.logger.error("Could not delete cache file: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
}
|
||||
|
||||
purge()
|
||||
AppDefaults.shared.lastImageCacheFlushDate = Date()
|
||||
|
||||
}
|
||||
@@ -48,4 +32,22 @@ struct CacheCleaner: Logging {
|
||||
|
||||
}
|
||||
|
||||
static func purge() {
|
||||
let tempDir = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!
|
||||
let faviconsFolderURL = tempDir.appendingPathComponent("Favicons")
|
||||
let imagesFolderURL = tempDir.appendingPathComponent("Images")
|
||||
let feedURLToIconURL = tempDir.appendingPathComponent("FeedURLToIconURLCache.plist")
|
||||
let homePageToIconURL = tempDir.appendingPathComponent("HomePageToIconURLCache.plist")
|
||||
let homePagesWithNoIconURL = tempDir.appendingPathComponent("HomePagesWithNoIconURLCache.plist")
|
||||
|
||||
for tempItem in [faviconsFolderURL, imagesFolderURL, feedURLToIconURL, homePageToIconURL, homePagesWithNoIconURL] {
|
||||
do {
|
||||
CacheCleaner.logger.info("Removing cache file: \(tempItem.absoluteString, privacy: .public)")
|
||||
try FileManager.default.removeItem(at: tempItem)
|
||||
} catch {
|
||||
CacheCleaner.logger.error("Could not delete cache file: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,20 +11,10 @@ import AppKit
|
||||
extension NSView {
|
||||
|
||||
func constraintsToMakeSubViewFullSize(_ subview: NSView) -> [NSLayoutConstraint] {
|
||||
|
||||
if #available(macOS 11, *) {
|
||||
let leadingConstraint = NSLayoutConstraint(item: subview, attribute: .leading, relatedBy: .equal, toItem: self.safeAreaLayoutGuide, attribute: .leading, multiplier: 1.0, constant: 0.0)
|
||||
let trailingConstraint = NSLayoutConstraint(item: subview, attribute: .trailing, relatedBy: .equal, toItem: self.safeAreaLayoutGuide, attribute: .trailing, multiplier: 1.0, constant: 0.0)
|
||||
let topConstraint = NSLayoutConstraint(item: subview, attribute: .top, relatedBy: .equal, toItem: self.safeAreaLayoutGuide, attribute: .top, multiplier: 1.0, constant: 0.0)
|
||||
let bottomConstraint = NSLayoutConstraint(item: subview, attribute: .bottom, relatedBy: .equal, toItem: self.safeAreaLayoutGuide, attribute: .bottom, multiplier: 1.0, constant: 0.0)
|
||||
return [leadingConstraint, trailingConstraint, topConstraint, bottomConstraint]
|
||||
} else {
|
||||
let leadingConstraint = NSLayoutConstraint(item: subview, attribute: .leading, relatedBy: .equal, toItem: self, attribute: .leading, multiplier: 1.0, constant: 0.0)
|
||||
let trailingConstraint = NSLayoutConstraint(item: subview, attribute: .trailing, relatedBy: .equal, toItem: self, attribute: .trailing, multiplier: 1.0, constant: 0.0)
|
||||
let topConstraint = NSLayoutConstraint(item: subview, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0)
|
||||
let bottomConstraint = NSLayoutConstraint(item: subview, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0)
|
||||
return [leadingConstraint, trailingConstraint, topConstraint, bottomConstraint]
|
||||
}
|
||||
|
||||
let leadingConstraint = NSLayoutConstraint(item: subview, attribute: .leading, relatedBy: .equal, toItem: self, attribute: .leading, multiplier: 1.0, constant: 0.0)
|
||||
let trailingConstraint = NSLayoutConstraint(item: subview, attribute: .trailing, relatedBy: .equal, toItem: self, attribute: .trailing, multiplier: 1.0, constant: 0.0)
|
||||
let topConstraint = NSLayoutConstraint(item: subview, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0)
|
||||
let bottomConstraint = NSLayoutConstraint(item: subview, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0)
|
||||
return [leadingConstraint, trailingConstraint, topConstraint, bottomConstraint]
|
||||
}
|
||||
}
|
||||
@@ -22,15 +22,17 @@ extension URL {
|
||||
|
||||
/// URL pointing to current app version release notes.
|
||||
static var releaseNotes: URL {
|
||||
let appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""
|
||||
var gitHub = "https://github.com/Ranchero-Software/NetNewsWire/releases/tag/"
|
||||
|
||||
#if os(macOS)
|
||||
gitHub += "mac-\(String(describing: appVersion))"
|
||||
return URL(string: gitHub)!
|
||||
gitHub += "mac-"
|
||||
#else
|
||||
gitHub += "ios-\(String(describing: appVersion))"
|
||||
return URL(string: gitHub)!
|
||||
gitHub += "ios-"
|
||||
#endif
|
||||
|
||||
gitHub += "\(Bundle.main.versionNumber)-\(Bundle.main.buildNumber)"
|
||||
|
||||
return URL(string: gitHub)!
|
||||
}
|
||||
|
||||
func valueFor(_ parameter: String) -> String? {
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
</head>
|
||||
<body>
|
||||
<outline text="Colossal" title="Colossal" type="rss" version="RSS" htmlUrl="https://www.thisiscolossal.com/" xmlUrl="https://www.thisiscolossal.com/feed/"/>
|
||||
<outline text="Accidentally in Code" title="Accidentally in Code" type="rss" version="RSS" htmlUrl="https://cate.blog/" xmlUrl="https://cate.blog/feed/"/>
|
||||
<outline text="Becky Hansmeyer" title="Becky Hansmeyer" type="rss" version="RSS" htmlUrl="https://beckyhansmeyer.com" xmlUrl="https://beckyhansmeyer.com/feed/"/>
|
||||
<outline text="Maurice Parker" title="Maurice Parker" type="rss" version="RSS" htmlUrl="https://vincode.io/" xmlUrl="https://vincode.io/feed.xml"/>
|
||||
<outline text="Maurice Parker" title="Maurice Parker" type="rss" version="RSS" htmlUrl="https://vincode.io/" xmlUrl="https://vincode.io/feed.xml"/>
|
||||
<outline text="Daring Fireball" title="Daring Fireball" type="rss" version="RSS" htmlUrl="https://daringfireball.net/" xmlUrl="https://daringfireball.net/feeds/json"/>
|
||||
<outline text="Manton Reece" title="Manton Reece" type="rss" version="RSS" htmlUrl="https://manton.org/" xmlUrl="https://www.manton.org/feed/json"/>
|
||||
<outline text="inessential" title="inessential" type="rss" version="RSS" htmlUrl="https://inessential.com/" xmlUrl="https://inessential.com/feed.json"/>
|
||||
<outline text="Julia Evans" title="Julia Evans" type="rss" version="RSS" htmlUrl="https://jvns.ca/" xmlUrl="https://jvns.ca/atom.xml"/>
|
||||
<outline text="Jason Kottke" title="Jason Kottke" type="rss" version="RSS" htmlUrl="https://kottke.org/" xmlUrl="http://feeds.kottke.org/json"/>
|
||||
<outline text="Six Colors" title="Six Colors" type="rss" version="RSS" htmlUrl="https://sixcolors.com/" xmlUrl="https://feedpress.me/sixcolors?type=xml"/>
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PrimaryContributors</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Maurice Parker</string>
|
||||
<key>url</key>
|
||||
<string>https://vincode.io</string>
|
||||
<key>role</key>
|
||||
<string>Lead Developer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Stuart Breckenridge</string>
|
||||
<key>url</key>
|
||||
<string>https://stuartbreckenridge.net</string>
|
||||
<key>role</key>
|
||||
<string>Contributing Developer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>url</key>
|
||||
<string>https://twitter.com/BradEllis</string>
|
||||
<key>name</key>
|
||||
<string>Brad Ellis</string>
|
||||
<key>role</key>
|
||||
<string>App Icon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>url</key>
|
||||
<string>https://twitter.com/kielgillard</string>
|
||||
<key>name</key>
|
||||
<string>Kiel Gillard</string>
|
||||
<key>role</key>
|
||||
<string>Feedly Syncing</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>url</key>
|
||||
<string>https://twitter.com/quanganhdo</string>
|
||||
<key>name</key>
|
||||
<string>Anh Do</string>
|
||||
<key>role</key>
|
||||
<string>NewsBlur Syncing</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>url</key>
|
||||
<string>https://github.com/wevah</string>
|
||||
<key>name</key>
|
||||
<string>Nate Weaver</string>
|
||||
<key>role</key>
|
||||
<string>Under-the-hood magic and CSS stylin’s</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>url</key>
|
||||
<string>https://github.com/brehaut/</string>
|
||||
<key>name</key>
|
||||
<string>Andrew Brehaut</string>
|
||||
<key>role</key>
|
||||
<string>Newsfoot Footnotes</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>url</key>
|
||||
<string>https://nostodnayr.net</string>
|
||||
<key>name</key>
|
||||
<string>Ryan Dotson</string>
|
||||
<key>role</key>
|
||||
<string>Help Book</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>AdditionalContributors</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Daniel Jalkut</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/danielpunkass</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Joe Heck</string>
|
||||
<key>url</key>
|
||||
<string>https://rhonabwy.com</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Olof Hellman</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/olofhellman</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Rizwan Mohamed Ibrahim</string>
|
||||
<key>url</key>
|
||||
<string>https://blog.rizwan.dev/</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Phil Viso</string>
|
||||
<key>url</key>
|
||||
<string>https://twitter.com/philviso</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>...and many more</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,6 +1,8 @@
|
||||
/* Shared iOS and macOS CSS rules. Platform specific rules are at the bottom of this file. */
|
||||
|
||||
body {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
word-wrap: break-word;
|
||||
max-width: 44em;
|
||||
}
|
||||
@@ -275,6 +277,10 @@ img, figure, video, div, object {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
@@ -428,11 +434,10 @@ a.footnote:hover,
|
||||
@supports (-webkit-touch-callout: none) {
|
||||
|
||||
body {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 20px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
|
||||
padding-top: 3px;
|
||||
padding-bottom: 20px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-webkit-text-size-adjust: none;
|
||||
@@ -482,10 +487,8 @@ a.footnote:hover,
|
||||
@supports not (-webkit-touch-callout: none) {
|
||||
|
||||
body {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
padding-left: 48px;
|
||||
padding-right: 48px;
|
||||
font-family: -apple-system;
|
||||
|
||||
@@ -224,6 +224,10 @@ img, figure, video, div, object {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -273,6 +273,10 @@ img, figure, video, div, object {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -246,6 +246,10 @@ img, figure, video, div, object {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -241,6 +241,10 @@ img, figure, video, div, object {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Thanks to Sheila and my family; thanks to my friends in Seattle and around the globe; thanks to the ever-patient and ever-awesome NetNewsWire beta testers.
|
||||
|
||||
Thanks to [Gus Mueller](https://shapeof.com/) for [FMDB](https://github.com/ccgus/fmdb) by [Flying Meat Software](http://flyingmeat.com/). Thanks to [GitHub](https://github.com) and [Slack](https://slack.com) for making open source collaboration easy and fun. Thanks to [Ben Ubois](https://benubois.com/) at [Feedbin](https://feedbin.com/) for all the extra help with syncing and article rendering — and for [hosting the server for the Reader view](https://feedbin.com/blog/2019/03/11/the-future-of-full-content/).
|
||||
|
||||
NetNewsWire 6 is dedicated to everyone working to save democracy around the world.
|
||||
Binary file not shown.
@@ -62,7 +62,7 @@ private extension UserNotificationManager {
|
||||
}
|
||||
content.body = ArticleStringFormatter.truncatedSummary(article)
|
||||
content.threadIdentifier = webFeed.webFeedID
|
||||
content.sound = UNNotificationSound.default
|
||||
content.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: AppAssets.notificationSoundBlipFileName))
|
||||
content.userInfo = [UserInfoKey.articlePath: article.pathUserInfo]
|
||||
content.categoryIdentifier = "NEW_ARTICLE_NOTIFICATION_CATEGORY"
|
||||
if let attachment = thumbnailAttachment(for: article, webFeed: webFeed) {
|
||||
|
||||
@@ -8,15 +8,16 @@
|
||||
|
||||
import Foundation
|
||||
import WidgetKit
|
||||
import os.log
|
||||
import UIKit
|
||||
import RSCore
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
|
||||
public final class WidgetDataEncoder: Logging {
|
||||
|
||||
public final class WidgetDataEncoder {
|
||||
|
||||
private let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Application")
|
||||
private let fetchLimit = 7
|
||||
|
||||
private lazy var appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String
|
||||
@@ -24,111 +25,132 @@ public final class WidgetDataEncoder: Logging {
|
||||
private lazy var imageContainer = containerURL?.appendingPathComponent("widgetImages", isDirectory: true)
|
||||
private lazy var dataURL = containerURL?.appendingPathComponent("widget-data.json")
|
||||
|
||||
private let encodeWidgetDataQueue = CoalescingQueue(name: "Encode the Widget Data", interval: 5.0)
|
||||
|
||||
public var isRunning = false
|
||||
|
||||
init () {
|
||||
if imageContainer != nil {
|
||||
try? FileManager.default.createDirectory(at: imageContainer!, withIntermediateDirectories: true, attributes: nil)
|
||||
}
|
||||
}
|
||||
|
||||
func encode() {
|
||||
if #available(iOS 14, *) {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(statusesDidChange(_:)), name: .StatusesDidChange, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
func encodeIfNecessary() {
|
||||
encodeWidgetDataQueue.performCallsImmediately()
|
||||
}
|
||||
isRunning = true
|
||||
|
||||
@objc func statusesDidChange(_ note: Notification) {
|
||||
encodeWidgetDataQueue.add(self, #selector(performEncodeWidgetData))
|
||||
}
|
||||
flushSharedContainer()
|
||||
os_log(.debug, log: log, "Starting encoding widget data.")
|
||||
|
||||
@objc private func performEncodeWidgetData() {
|
||||
// We will be on the Main Thread when the encodeIfNecessary function is called. We want
|
||||
// block the main thread in that case so that the widget data is encoded. If it is on
|
||||
// a background Thread, it was called by the CoalescingQueue. In that case we need to
|
||||
// move it to the Main Thread and want to execute it async.
|
||||
if Thread.isMainThread {
|
||||
encodeWidgetData()
|
||||
} else {
|
||||
DispatchQueue.main.async {
|
||||
self.encodeWidgetData()
|
||||
self.encodeWidgetData() { latestData in
|
||||
guard let latestData = latestData else {
|
||||
self.isRunning = false
|
||||
return
|
||||
}
|
||||
|
||||
let encodedData = try? JSONEncoder().encode(latestData)
|
||||
|
||||
os_log(.debug, log: self.log, "Finished encoding widget data.")
|
||||
|
||||
if self.fileExists() {
|
||||
try? FileManager.default.removeItem(at: self.dataURL!)
|
||||
os_log(.debug, log: self.log, "Removed widget data from container.")
|
||||
}
|
||||
|
||||
if FileManager.default.createFile(atPath: self.dataURL!.path, contents: encodedData, attributes: nil) {
|
||||
os_log(.debug, log: self.log, "Wrote widget data to container.")
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
}
|
||||
|
||||
self.isRunning = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func encodeWidgetData() {
|
||||
flushSharedContainer()
|
||||
logger.debug("Starting encoding widget data.")
|
||||
@available(iOS 14, *)
|
||||
private func encodeWidgetData(completion: @escaping (WidgetData?) -> Void) {
|
||||
var dispatchGroup = DispatchGroup()
|
||||
var groupError: Error? = nil
|
||||
|
||||
do {
|
||||
let unreadArticles = Array(try AccountManager.shared.fetchArticles(.unread(fetchLimit))).sortedByDate(.orderedDescending)
|
||||
let starredArticles = Array(try AccountManager.shared.fetchArticles(.starred(fetchLimit))).sortedByDate(.orderedDescending)
|
||||
let todayArticles = Array(try AccountManager.shared.fetchArticles(.today(fetchLimit))).sortedByDate(.orderedDescending)
|
||||
|
||||
var unread = [LatestArticle]()
|
||||
var today = [LatestArticle]()
|
||||
var starred = [LatestArticle]()
|
||||
|
||||
for article in unreadArticles {
|
||||
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||
feedTitle: article.sortableName,
|
||||
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
|
||||
articleSummary: article.summary,
|
||||
feedIconPath: writeImageDataToSharedContainer(article.iconImage()?.image.dataRepresentation()),
|
||||
pubDate: article.datePublished?.description ?? "")
|
||||
unread.append(latestArticle)
|
||||
}
|
||||
|
||||
for article in starredArticles {
|
||||
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||
feedTitle: article.sortableName,
|
||||
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
|
||||
articleSummary: article.summary,
|
||||
feedIconPath: writeImageDataToSharedContainer(article.iconImage()?.image.dataRepresentation()),
|
||||
pubDate: article.datePublished?.description ?? "")
|
||||
starred.append(latestArticle)
|
||||
}
|
||||
|
||||
for article in todayArticles {
|
||||
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||
feedTitle: article.sortableName,
|
||||
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
|
||||
articleSummary: article.summary,
|
||||
feedIconPath: writeImageDataToSharedContainer(article.iconImage()?.image.dataRepresentation()),
|
||||
pubDate: article.datePublished?.description ?? "")
|
||||
today.append(latestArticle)
|
||||
}
|
||||
|
||||
let latestData = WidgetData(currentUnreadCount: SmartFeedsController.shared.unreadFeed.unreadCount,
|
||||
currentTodayCount: SmartFeedsController.shared.todayFeed.unreadCount,
|
||||
currentStarredCount: try AccountManager.shared.fetchCountForStarredArticles(),
|
||||
unreadArticles: unread,
|
||||
starredArticles: starred,
|
||||
todayArticles:today,
|
||||
lastUpdateTime: Date())
|
||||
|
||||
|
||||
DispatchQueue.global().async { [weak self] in
|
||||
guard let self = self else { return }
|
||||
|
||||
let encodedData = try? JSONEncoder().encode(latestData)
|
||||
|
||||
self.logger.debug("Finished encoding widget data.")
|
||||
|
||||
if self.fileExists() {
|
||||
try? FileManager.default.removeItem(at: self.dataURL!)
|
||||
self.logger.debug("Removed widget data from container.")
|
||||
var unread = [LatestArticle]()
|
||||
|
||||
dispatchGroup.enter()
|
||||
AccountManager.shared.fetchArticlesAsync(.unread(fetchLimit)) { (articleSetResult) in
|
||||
switch articleSetResult {
|
||||
case .success(let articles):
|
||||
for article in articles {
|
||||
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||
feedTitle: article.sortableName,
|
||||
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
|
||||
articleSummary: article.summary,
|
||||
feedIconPath: self.writeImageDataToSharedContainer(article.iconImage()?.image.dataRepresentation()),
|
||||
pubDate: article.datePublished?.description ?? "")
|
||||
unread.append(latestArticle)
|
||||
}
|
||||
if FileManager.default.createFile(atPath: self.dataURL!.path, contents: encodedData, attributes: nil) {
|
||||
self.logger.debug("Wrote widget data to container.")
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
}
|
||||
|
||||
case .failure(let databaseError):
|
||||
groupError = databaseError
|
||||
}
|
||||
} catch {
|
||||
logger.error("WidgetDataEncoder failed to write the widget data.")
|
||||
dispatchGroup.leave()
|
||||
}
|
||||
|
||||
var starred = [LatestArticle]()
|
||||
|
||||
dispatchGroup.enter()
|
||||
AccountManager.shared.fetchArticlesAsync(.starred(fetchLimit)) { (articleSetResult) in
|
||||
switch articleSetResult {
|
||||
case .success(let articles):
|
||||
for article in articles {
|
||||
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||
feedTitle: article.sortableName,
|
||||
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
|
||||
articleSummary: article.summary,
|
||||
feedIconPath: self.writeImageDataToSharedContainer(article.iconImage()?.image.dataRepresentation()),
|
||||
pubDate: article.datePublished?.description ?? "")
|
||||
starred.append(latestArticle)
|
||||
}
|
||||
case .failure(let databaseError):
|
||||
groupError = databaseError
|
||||
}
|
||||
dispatchGroup.leave()
|
||||
}
|
||||
|
||||
var today = [LatestArticle]()
|
||||
|
||||
dispatchGroup.enter()
|
||||
AccountManager.shared.fetchArticlesAsync(.today(fetchLimit)) { (articleSetResult) in
|
||||
switch articleSetResult {
|
||||
case .success(let articles):
|
||||
for article in articles {
|
||||
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||
feedTitle: article.sortableName,
|
||||
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
|
||||
articleSummary: article.summary,
|
||||
feedIconPath: self.writeImageDataToSharedContainer(article.iconImage()?.image.dataRepresentation()),
|
||||
pubDate: article.datePublished?.description ?? "")
|
||||
today.append(latestArticle)
|
||||
}
|
||||
case .failure(let databaseError):
|
||||
groupError = databaseError
|
||||
}
|
||||
dispatchGroup.leave()
|
||||
}
|
||||
|
||||
dispatchGroup.notify(queue: .main) {
|
||||
if groupError != nil {
|
||||
os_log(.error, log: self.log, "WidgetDataEncoder failed to write the widget data.")
|
||||
completion(nil)
|
||||
} else {
|
||||
let latestData = WidgetData(currentUnreadCount: SmartFeedsController.shared.unreadFeed.unreadCount,
|
||||
currentTodayCount: SmartFeedsController.shared.todayFeed.unreadCount,
|
||||
currentStarredCount: (try? AccountManager.shared.fetchCountForStarredArticles()) ?? 0,
|
||||
unreadArticles: unread,
|
||||
starredArticles: starred,
|
||||
todayArticles:today,
|
||||
lastUpdateTime: Date())
|
||||
completion(latestData)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private func fileExists() -> Bool {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import PackageDescription
|
||||
|
||||
var dependencies: [Package.Dependency] = [
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.1.0")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSDatabase.git", .upToNextMajor(from: "1.0.0")),
|
||||
]
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Mac Release Notes
|
||||
|
||||
### 6.1.1b1 build 6107 3 Nov 2022
|
||||
|
||||
Fixed a bug that could prevent users from accessing BazQux if an article was missing a field
|
||||
Fixed an issue that could prevent Feedly users from syncing if they tried to mark too many articles as read at the same time
|
||||
|
||||
### 6.1 build 6106 6 April 2022
|
||||
|
||||
Small cosmetic change — better alignment for items in General Preferences pane
|
||||
|
||||
@@ -1,6 +1,48 @@
|
||||
# iOS Release Notes
|
||||
|
||||
### 6.1 TestFlight build 6105 = 6 July 2022
|
||||
### 6.1 Release build 6110 - 9 Nov 2022
|
||||
|
||||
Changes since 6.0.1…
|
||||
|
||||
Article themes. Several themes ship with the app, and you can create your own. You can change the theme in Preferences.
|
||||
Fixed a bug that could prevent BazQux syncing when an article may not contain all the info we expect
|
||||
Fixed a bug that could prevent Feedly syncing when marking a large number of articles as read
|
||||
Disallow creation of iCloud account in the app if iCloud and iCloud Drive aren’t both enabled
|
||||
Added links to iCloud Syncing Limitations & Solutions on iCloud Account Management UI
|
||||
Copy URLs using repaired, rather than raw, feed links
|
||||
Fixed bug showing quote tweets that only included an image
|
||||
Video autoplay is now disallowed
|
||||
Article view now supports RTL layout
|
||||
Fixed a few crashing bugs
|
||||
Fixed a layout bug that could happen on returning to the Feeds list
|
||||
Fixed a bug where go-to-feed might not properly expand disclosure triangles
|
||||
Prevented the Delete option from showing in the Edit menu on the Article View
|
||||
Fixed Widget article icon lookup bug
|
||||
|
||||
|
||||
### 6.1 TestFlight build 6109 - 31 Oct 2022
|
||||
|
||||
Enhanced Widget integration to make counts more accurate
|
||||
Enhanced Widget integration to make make it more efficient and save on battery life
|
||||
|
||||
### 6.1 TestFlight build 6108 - 28 Oct 2022
|
||||
|
||||
Fixed a bug that could prevent BazQux syncing when an article may not contain all the info we expect
|
||||
Fixed a bug that could prevent Feedly syncing when marking a large number of articles as read
|
||||
Prevent Widget integration from running while in the background to remove some crashes
|
||||
|
||||
### 6.1 TestFlight build 6107 - 28 Sept 2022
|
||||
|
||||
Added links to iCloud Syncing Limitations & Solutions on iCloud Account Management UI
|
||||
Prevented the Delete option from showing in the Edit menu on the Article View
|
||||
Greatly reduced the possibility of a background crash caused by Widget integration
|
||||
Fixed Widget article icon lookup bug
|
||||
|
||||
### 6.1 TestFlight build 6106 - 9 July 2022
|
||||
|
||||
Fix a bug where images wouldn’t appear in the widget
|
||||
|
||||
### 6.1 TestFlight build 6105 - 6 July 2022
|
||||
|
||||
Write widget icons to the shared container
|
||||
Make crashes slightly less likely when building up widget data
|
||||
@@ -27,6 +69,14 @@ Fixed a bug where go-to-feed might not properly expand disclosure triangles
|
||||
* Video autoplay is now disallowed.
|
||||
* Article view now supports RTL layout.
|
||||
|
||||
### 6.0.2 Release - 15 Oct 2021
|
||||
|
||||
Makes a particular crash on startup, that happens only on iPad, far less likely.
|
||||
|
||||
### 6.0.2 TestFlight build 610 - 25 Sep 2021
|
||||
|
||||
Fixed bug with state restoration on launch (bug introduced in previous TestFlight build)
|
||||
|
||||
### 6.0.1 TestFlight build 608 - 28 Aug 2021
|
||||
|
||||
* Fixed our top crashing bug — it could happen when updating a table view
|
||||
|
||||
@@ -14,7 +14,7 @@ enum CloudKitAccountViewControllerError: LocalizedError {
|
||||
case iCloudDriveMissing
|
||||
|
||||
var errorDescription: String? {
|
||||
return NSLocalizedString("Unable to add iCloud Account. Please make sure you have iCloud and iCloud enabled in System Preferences.", comment: "Unable to add iCloud Account.")
|
||||
return NSLocalizedString("Unable to add iCloud Account. Please make sure you have iCloud and iCloud Drive enabled in System Preferences.", comment: "Unable to add iCloud Account.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+27
-27
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina5_9" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -19,35 +19,35 @@
|
||||
<tableViewSection id="3tl-Mb-Eno">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="Cell" rowHeight="44" id="lyJ-rf-8GA">
|
||||
<rect key="frame" x="16" y="18" width="343" height="44"/>
|
||||
<rect key="frame" x="20" y="18" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="lyJ-rf-8GA" id="eNS-Rp-w0A">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="URL" textAlignment="natural" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="eRp-AP-WFq">
|
||||
<rect key="frame" x="20" y="4" width="323" height="36"/>
|
||||
<rect key="frame" x="20" y="4" width="295" height="36"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="URL"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="eRp-AP-WFq" firstAttribute="top" secondItem="eNS-Rp-w0A" secondAttribute="top" constant="4" id="80p-a2-3NC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eRp-AP-WFq" secondAttribute="trailing" id="Xue-v3-aqR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eRp-AP-WFq" secondAttribute="trailing" constant="20" symbolic="YES" id="Xue-v3-aqR"/>
|
||||
<constraint firstItem="eRp-AP-WFq" firstAttribute="leading" secondItem="eNS-Rp-w0A" secondAttribute="leading" constant="20" symbolic="YES" id="bHJ-7l-Pl3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="eRp-AP-WFq" secondAttribute="bottom" constant="4" id="fs0-iw-zTo"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" rowHeight="44" id="Pxz-fv-QhQ">
|
||||
<rect key="frame" x="16" y="62" width="343" height="44"/>
|
||||
<rect key="frame" x="20" y="62" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Pxz-fv-QhQ" id="8aP-2A-8jc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Title (Optional)" textAlignment="natural" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="u7n-VL-Ho9">
|
||||
<rect key="frame" x="20" y="4" width="303" height="36"/>
|
||||
<rect key="frame" x="20" y="4" width="295" height="36"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="words"/>
|
||||
</textField>
|
||||
@@ -61,10 +61,10 @@
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="44" id="rlc-34-flT">
|
||||
<rect key="frame" x="16" y="106" width="343" height="44"/>
|
||||
<rect key="frame" x="20" y="106" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rlc-34-flT" id="ZbC-Z6-dtq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Folder" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RtT-rR-5LA">
|
||||
@@ -74,7 +74,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="htg-Nn-3xi">
|
||||
<rect key="frame" x="281" y="11.666666666666664" width="42" height="21"/>
|
||||
<rect key="frame" x="273" y="11.666666666666664" width="42" height="21"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -112,7 +112,7 @@
|
||||
</barButtonItem>
|
||||
<barButtonItem id="qP4-8x-XbO">
|
||||
<view key="customView" contentMode="scaleToFill" id="9ct-kH-nAp">
|
||||
<rect key="frame" x="300.33333333333331" y="12" width="20" height="20"/>
|
||||
<rect key="frame" x="299" y="12" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="3ph-Td-s1Z">
|
||||
@@ -144,7 +144,7 @@
|
||||
<objects>
|
||||
<navigationController storyboardIdentifier="AddWebFeedFolderNavViewController" id="WDg-F7-gfk" customClass="ModalNavigationController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="akM-T1-shZ">
|
||||
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="47" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
@@ -164,7 +164,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AccountCell" id="bp5-2u-4S4" customClass="AddComboTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="28" width="375" height="43.666667938232422"/>
|
||||
<rect key="frame" x="0.0" y="50" width="375" height="43.666667938232422"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="bp5-2u-4S4" id="9HE-eR-YIp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
|
||||
@@ -199,7 +199,7 @@
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="FolderCell" id="S24-c1-0Ir" customClass="AddComboTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="71.666667938232422" width="375" height="43.666667938232422"/>
|
||||
<rect key="frame" x="0.0" y="93.666667938232422" width="375" height="43.666667938232422"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="S24-c1-0Ir" id="bA3-AB-H1n">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
|
||||
@@ -256,7 +256,7 @@
|
||||
<objects>
|
||||
<navigationController storyboardIdentifier="AddWebFeedViewControllerNav" id="4Ej-aI-tUP" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Fot-QF-7Rn">
|
||||
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="47" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
@@ -278,14 +278,14 @@
|
||||
<tableViewSection id="12M-tp-EeV">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="44" id="XJI-0M-cAh">
|
||||
<rect key="frame" x="16" y="18" width="343" height="44"/>
|
||||
<rect key="frame" x="20" y="18" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="XJI-0M-cAh" id="tIS-Tx-i17">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Name" textAlignment="natural" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="lZK-wx-jbo">
|
||||
<rect key="frame" x="20" y="4" width="303" height="36"/>
|
||||
<rect key="frame" x="20" y="4" width="295" height="36"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="words"/>
|
||||
</textField>
|
||||
@@ -303,10 +303,10 @@
|
||||
<tableViewSection id="bX9-Y2-S2D">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="44" id="uU0-Jh-goT">
|
||||
<rect key="frame" x="16" y="98" width="343" height="44"/>
|
||||
<rect key="frame" x="20" y="98" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="uU0-Jh-goT" id="y2g-dW-fPZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Account" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YRf-I7-nkL">
|
||||
@@ -316,7 +316,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mxj-Bw-Jfx">
|
||||
<rect key="frame" x="281" y="12" width="42" height="20"/>
|
||||
<rect key="frame" x="273" y="12" width="42" height="20"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -333,14 +333,14 @@
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="140" id="zRi-p6-4KU">
|
||||
<rect key="frame" x="16" y="142" width="343" height="140"/>
|
||||
<rect key="frame" x="20" y="142" width="335" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zRi-p6-4KU" id="wek-Qh-OXr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="140"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eGY-V8-gzJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="140"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="140"/>
|
||||
</pickerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
@@ -388,7 +388,7 @@
|
||||
<objects>
|
||||
<navigationController storyboardIdentifier="AddFolderViewControllerNav" id="edk-IE-nce" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Pi1-Bc-YXQ">
|
||||
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="47" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
|
||||
@@ -54,10 +54,8 @@ class AddFeedViewController: UITableViewController {
|
||||
activityIndicator.isHidden = true
|
||||
activityIndicator.color = .label
|
||||
|
||||
if initialFeed == nil, let urlString = UIPasteboard.general.string {
|
||||
if urlString.mayBeURL {
|
||||
initialFeed = urlString.normalizedURL
|
||||
}
|
||||
if initialFeed == nil && UIPasteboard.general.hasURLs, let url = UIPasteboard.general.url {
|
||||
initialFeed = url.absoluteString.normalizedURL
|
||||
}
|
||||
|
||||
urlTextField.autocorrectionType = .no
|
||||
|
||||
@@ -325,4 +325,9 @@ struct AppAssets {
|
||||
}
|
||||
}
|
||||
|
||||
static var notificationSoundBlipFileName: String = {
|
||||
// https://freesound.org/people/cabled_mess/sounds/350862/
|
||||
return "notificationSoundBlip.mp3"
|
||||
}()
|
||||
|
||||
}
|
||||
@@ -53,7 +53,6 @@ final class AppDefaults {
|
||||
static let articleFullscreenEnabled = "articleFullscreenEnabled"
|
||||
static let hasUsedFullScreenPreviously = "hasUsedFullScreenPreviously"
|
||||
static let confirmMarkAllAsRead = "confirmMarkAllAsRead"
|
||||
static let lastRefresh = "lastRefresh"
|
||||
static let addWebFeedAccountID = "addWebFeedAccountID"
|
||||
static let addWebFeedFolderName = "addWebFeedFolderName"
|
||||
static let addFolderAccountID = "addFolderAccountID"
|
||||
@@ -196,15 +195,6 @@ final class AppDefaults {
|
||||
}
|
||||
}
|
||||
|
||||
var lastRefresh: Date? {
|
||||
get {
|
||||
return AppDefaults.date(for: Key.lastRefresh)
|
||||
}
|
||||
set {
|
||||
AppDefaults.setDate(for: Key.lastRefresh, newValue)
|
||||
}
|
||||
}
|
||||
|
||||
var timelineNumberOfLines: Int {
|
||||
get {
|
||||
return AppDefaults.int(for: Key.timelineNumberOfLines)
|
||||
|
||||
+33
-43
@@ -10,6 +10,7 @@ import UIKit
|
||||
import RSCore
|
||||
import RSWeb
|
||||
import Account
|
||||
import Articles
|
||||
import BackgroundTasks
|
||||
import Secrets
|
||||
import WidgetKit
|
||||
@@ -73,7 +74,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
FeedProviderManager.shared.delegate = ExtensionPointManager.shared
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(accountRefreshDidFinish(_:)), name: .AccountRefreshDidFinish, object: nil)
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
@@ -150,10 +150,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
}
|
||||
}
|
||||
|
||||
@objc func accountRefreshDidFinish(_ note: Notification) {
|
||||
AppDefaults.shared.lastRefresh = Date()
|
||||
}
|
||||
|
||||
// MARK: - API
|
||||
|
||||
func manualRefresh(errorHandler: @escaping (Error) -> ()) {
|
||||
@@ -172,10 +168,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
|
||||
func prepareAccountsForBackground() {
|
||||
extensionFeedAddRequestFile.suspend()
|
||||
widgetDataEncoder.encodeIfNecessary()
|
||||
syncTimer?.invalidate()
|
||||
scheduleBackgroundFeedRefresh()
|
||||
syncArticleStatus()
|
||||
widgetDataEncoder.encode()
|
||||
waitForSyncTasksToFinish()
|
||||
}
|
||||
|
||||
@@ -183,7 +179,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
extensionFeedAddRequestFile.resume()
|
||||
syncTimer?.update()
|
||||
|
||||
if let lastRefresh = AppDefaults.shared.lastRefresh {
|
||||
if let lastRefresh = AccountManager.shared.lastArticleFetchEndTime {
|
||||
if Date() > lastRefresh.addingTimeInterval(15 * 60) {
|
||||
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)
|
||||
} else {
|
||||
@@ -219,6 +215,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
|
||||
}
|
||||
|
||||
func presentThemeImportError(_ error: Error) {
|
||||
let windowScene = {
|
||||
let scenes = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }
|
||||
return scenes.filter { $0.activationState == .foregroundActive }.first ?? scenes.first
|
||||
}()
|
||||
guard let sceneDelegate = windowScene?.delegate as? SceneDelegate else { return }
|
||||
sceneDelegate.presentError(error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: App Initialization
|
||||
@@ -294,7 +299,7 @@ private extension AppDelegate {
|
||||
return
|
||||
}
|
||||
|
||||
if AccountManager.shared.refreshInProgress || isSyncArticleStatusRunning {
|
||||
if AccountManager.shared.refreshInProgress || isSyncArticleStatusRunning || widgetDataEncoder.isRunning {
|
||||
logger.info("Waiting for sync to finish...")
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { [weak self] in
|
||||
self?.waitToComplete(completion: completion)
|
||||
@@ -423,55 +428,40 @@ private extension AppDelegate {
|
||||
private extension AppDelegate {
|
||||
|
||||
func handleMarkAsRead(userInfo: [AnyHashable: Any]) {
|
||||
guard let articlePathUserInfo = userInfo[UserInfoKey.articlePath] as? [AnyHashable : Any],
|
||||
let accountID = articlePathUserInfo[ArticlePathKey.accountID] as? String,
|
||||
let articleID = articlePathUserInfo[ArticlePathKey.articleID] as? String else {
|
||||
return
|
||||
}
|
||||
resumeDatabaseProcessingIfNecessary()
|
||||
let account = AccountManager.shared.existingAccount(with: accountID)
|
||||
guard account != nil else {
|
||||
logger.debug("No account found from notification.")
|
||||
return
|
||||
}
|
||||
let article = try? account!.fetchArticles(.articleIDs([articleID]))
|
||||
guard article != nil else {
|
||||
logger.debug("No account found from search using \(articleID, privacy: .public)")
|
||||
return
|
||||
}
|
||||
account!.markArticles(article!, statusKey: .read, flag: true) { _ in }
|
||||
self.prepareAccountsForBackground()
|
||||
account!.syncArticleStatus(completion: { [weak self] _ in
|
||||
if !AccountManager.shared.isSuspended {
|
||||
self?.prepareAccountsForBackground()
|
||||
self?.suspendApplication()
|
||||
}
|
||||
})
|
||||
markArticle(userInfo: userInfo, statusKey: .read)
|
||||
}
|
||||
|
||||
func handleMarkAsStarred(userInfo: [AnyHashable: Any]) {
|
||||
markArticle(userInfo: userInfo, statusKey: .starred)
|
||||
}
|
||||
|
||||
func markArticle(userInfo: [AnyHashable: Any], statusKey: ArticleStatus.Key) {
|
||||
guard let articlePathUserInfo = userInfo[UserInfoKey.articlePath] as? [AnyHashable : Any],
|
||||
let accountID = articlePathUserInfo[ArticlePathKey.accountID] as? String,
|
||||
let articleID = articlePathUserInfo[ArticlePathKey.articleID] as? String else {
|
||||
return
|
||||
}
|
||||
|
||||
resumeDatabaseProcessingIfNecessary()
|
||||
let account = AccountManager.shared.existingAccount(with: accountID)
|
||||
guard account != nil else {
|
||||
|
||||
guard let account = AccountManager.shared.existingAccount(with: accountID) else {
|
||||
logger.debug("No account found from notification.")
|
||||
return
|
||||
}
|
||||
let article = try? account!.fetchArticles(.articleIDs([articleID]))
|
||||
guard article != nil else {
|
||||
|
||||
guard let articles = try? account.fetchArticles(.articleIDs([articleID])), !articles.isEmpty else {
|
||||
logger.debug("No article found from search using \(articleID, privacy: .public)")
|
||||
return
|
||||
}
|
||||
account!.markArticles(article!, statusKey: .starred, flag: true) { _ in }
|
||||
account!.syncArticleStatus(completion: { [weak self] _ in
|
||||
if !AccountManager.shared.isSuspended {
|
||||
self?.prepareAccountsForBackground()
|
||||
self?.suspendApplication()
|
||||
}
|
||||
})
|
||||
|
||||
account.mark(articles: articles, statusKey: statusKey, flag: true) { [weak self] _ in
|
||||
account.syncArticleStatus(completion: { [weak self] _ in
|
||||
if !AccountManager.shared.isSuspended {
|
||||
self?.prepareAccountsForBackground()
|
||||
self?.suspendApplication()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,8 +11,9 @@ import WebKit
|
||||
import Account
|
||||
import Articles
|
||||
import SafariServices
|
||||
import RSCore
|
||||
|
||||
class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
class ArticleViewController: UIViewController, MainControllerIdentifiable, Logging {
|
||||
|
||||
typealias State = (extractedArticle: ExtractedArticle?,
|
||||
isShowingExtractedArticle: Bool,
|
||||
@@ -87,6 +88,8 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
return keyboardManager.keyCommands
|
||||
}
|
||||
|
||||
private var lastKnownDisplayMode: UISplitViewController.DisplayMode?
|
||||
|
||||
var currentUnreadCount: Int = 0 {
|
||||
didSet {
|
||||
updateUnreadCountIndicator()
|
||||
@@ -102,7 +105,6 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(reloadDueToThemeChange(_:)), name: .CurrentArticleThemeDidChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(configureAppearanceMenu(_:)), name: .ArticleThemeNamesDidChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(updateUnreadCountIndicator(_:)), name: UIDevice.orientationDidChangeNotification, object: nil)
|
||||
|
||||
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
||||
toolbarItems?.insert(UIBarButtonItem(customView: articleExtractorButton), at: 6)
|
||||
@@ -258,7 +260,7 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
identifier: nil,
|
||||
discoverabilityTitle: nil,
|
||||
attributes: [],
|
||||
state: ArticleThemesManager.shared.currentThemeName == themeName ? .on : .off,
|
||||
state: ArticleThemesManager.shared.currentTheme.name == themeName ? .on : .off,
|
||||
handler: { action in
|
||||
ArticleThemesManager.shared.currentThemeName = themeName
|
||||
})
|
||||
@@ -270,7 +272,7 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
identifier: nil,
|
||||
discoverabilityTitle: nil,
|
||||
attributes: [],
|
||||
state: ArticleThemesManager.shared.currentThemeName == AppDefaults.defaultThemeName ? .on : .off,
|
||||
state: ArticleThemesManager.shared.currentTheme.name == AppDefaults.defaultThemeName ? .on : .off,
|
||||
handler: { _ in
|
||||
ArticleThemesManager.shared.currentThemeName = AppDefaults.defaultThemeName
|
||||
})
|
||||
@@ -343,42 +345,6 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
configureAppearanceMenu()
|
||||
}
|
||||
|
||||
|
||||
/// Updates the indicator count in the navigation bar.
|
||||
/// For iPhone, this indicator is visible if the unread count is > 0.
|
||||
/// For iPad, this indicator is visible if it is in `portrait` or `unknown`
|
||||
/// orientation, **and** the unread count is > 0.
|
||||
/// - Parameter sender: `Any` (optional)
|
||||
@objc
|
||||
public func updateUnreadCountIndicator(_ sender: Any? = nil) {
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
if currentUnreadCount > 0 {
|
||||
let unreadCountView = MasterTimelineUnreadCountView(frame: .zero)
|
||||
unreadCountView.unreadCount = currentUnreadCount
|
||||
unreadCountView.setFrameIfNotEqual(CGRect(x: 0, y: 0, width: unreadCountView.intrinsicContentSize.width, height: unreadCountView.intrinsicContentSize.height))
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: unreadCountView)
|
||||
} else {
|
||||
navigationItem.leftBarButtonItem = nil
|
||||
}
|
||||
} else {
|
||||
|
||||
if UIDevice.current.orientation.isPortrait || !UIDevice.current.orientation.isValidInterfaceOrientation {
|
||||
if currentUnreadCount > 0 {
|
||||
let unreadCountView = MasterTimelineUnreadCountView(frame: .zero)
|
||||
unreadCountView.unreadCount = currentUnreadCount
|
||||
unreadCountView.setFrameIfNotEqual(CGRect(x: 0, y: 0, width: unreadCountView.intrinsicContentSize.width, height: unreadCountView.intrinsicContentSize.height))
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: unreadCountView)
|
||||
} else {
|
||||
navigationItem.leftBarButtonItem = nil
|
||||
}
|
||||
} else {
|
||||
navigationItem.leftBarButtonItem = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
@objc dynamic func unreadCountDidChange(_ notification: Notification) {
|
||||
@@ -486,6 +452,12 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
func setScrollPosition(isShowingExtractedArticle: Bool, articleWindowScrollY: Int) {
|
||||
currentWebViewController?.setScrollPosition(isShowingExtractedArticle: isShowingExtractedArticle, articleWindowScrollY: articleWindowScrollY)
|
||||
}
|
||||
|
||||
public func splitViewControllerWillChangeTo(displayMode: UISplitViewController.DisplayMode) {
|
||||
lastKnownDisplayMode = displayMode
|
||||
updateUnreadCountIndicator()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Find in Article
|
||||
@@ -644,4 +616,15 @@ private extension ArticleViewController {
|
||||
return controller
|
||||
}
|
||||
|
||||
func updateUnreadCountIndicator() {
|
||||
if currentUnreadCount > 0 && (traitCollection.userInterfaceIdiom == .phone || lastKnownDisplayMode == .secondaryOnly) {
|
||||
let unreadCountView = MasterTimelineUnreadCountView(frame: .zero)
|
||||
unreadCountView.unreadCount = currentUnreadCount
|
||||
unreadCountView.setFrameIfNotEqual(CGRect(x: 0, y: 0, width: unreadCountView.intrinsicContentSize.width, height: unreadCountView.intrinsicContentSize.height))
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: unreadCountView)
|
||||
} else {
|
||||
navigationItem.leftBarButtonItem = nil
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ class OpenInBrowserActivity: UIActivity {
|
||||
}
|
||||
|
||||
override var activityImage: UIImage? {
|
||||
return UIImage(systemName: "globe", withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .regular))
|
||||
return AppAssets.safariImage
|
||||
}
|
||||
|
||||
override var activityType: UIActivity.ActivityType? {
|
||||
|
||||
@@ -386,12 +386,8 @@ extension WebViewController: WKNavigationDelegate {
|
||||
} else if components?.scheme == "mailto" {
|
||||
decisionHandler(.cancel)
|
||||
|
||||
guard let emailAddress = url.percentEncodedEmailAddress else {
|
||||
return
|
||||
}
|
||||
|
||||
if UIApplication.shared.canOpenURL(emailAddress) {
|
||||
UIApplication.shared.open(emailAddress, options: [.universalLinksOnly : false], completionHandler: nil)
|
||||
if UIApplication.shared.canOpenURL(url) {
|
||||
UIApplication.shared.open(url, options: [.universalLinksOnly : false], completionHandler: nil)
|
||||
} else {
|
||||
let alert = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: NSLocalizedString("This device cannot send emails.", comment: "This device cannot send emails."), preferredStyle: .alert)
|
||||
alert.addAction(.init(title: NSLocalizedString("Dismiss", comment: "Dismiss"), style: .cancel, handler: nil))
|
||||
|
||||
@@ -128,14 +128,17 @@ class MasterFeedTableViewCell : VibrantTableViewCell {
|
||||
self.disclosureButton?.accessibilityLabel = NSLocalizedString("Collapse Folder", comment: "Collapse Folder")
|
||||
self.disclosureButton?.imageView?.transform = CGAffineTransform(rotationAngle: 1.570796)
|
||||
} else {
|
||||
self.disclosureButton?.accessibilityLabel = NSLocalizedString("Expand Folder", comment: "Expand Folder")
|
||||
self.disclosureButton?.accessibilityLabel = NSLocalizedString("Expand Folder", comment: "Expand Folder")
|
||||
self.disclosureButton?.imageView?.transform = CGAffineTransform(rotationAngle: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func applyThemeProperties() {
|
||||
super.applyThemeProperties()
|
||||
override func updateConfiguration(using state: UICellConfigurationState) {
|
||||
backgroundConfiguration = UIBackgroundConfiguration.listSidebarCell().updated(for: state)
|
||||
if state.isSelected {
|
||||
backgroundConfiguration?.backgroundColor = AppAssets.secondaryAccentColor
|
||||
}
|
||||
}
|
||||
|
||||
override func willTransition(to state: UITableViewCell.StateMask) {
|
||||
@@ -171,8 +174,10 @@ class MasterFeedTableViewCell : VibrantTableViewCell {
|
||||
|
||||
let iconTintColor: UIColor
|
||||
if isHighlighted || isSelected {
|
||||
disclosureButton?.tintColor = AppAssets.vibrantTextColor
|
||||
iconTintColor = AppAssets.vibrantTextColor
|
||||
} else {
|
||||
disclosureButton?.tintColor = AppAssets.secondaryAccentColor
|
||||
if let preferredColor = iconImage?.preferredColor {
|
||||
iconTintColor = UIColor(cgColor: preferredColor)
|
||||
} else {
|
||||
|
||||
@@ -18,33 +18,63 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UITableViewDropProposal {
|
||||
guard let destIndexPath = destinationIndexPath, destIndexPath.section > 0, tableView.hasActiveDrag else {
|
||||
guard tableView.hasActiveDrag else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
guard let sourceNode = session.localDragSession?.items.first?.localObject as? Node,
|
||||
let sourceWebFeed = sourceNode.representedObject as? WebFeed else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
guard let destFeed = coordinator.nodeFor(destIndexPath)?.representedObject as? Feed,
|
||||
let destAccount = destFeed.account,
|
||||
let destCell = tableView.cellForRow(at: destIndexPath) else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
var successOperation = UIDropOperation.move
|
||||
|
||||
if let destinationIndexPath = destinationIndexPath,
|
||||
let sourceIndexPath = coordinator.indexPathFor(sourceNode),
|
||||
destinationIndexPath.section != sourceIndexPath.section {
|
||||
successOperation = .copy
|
||||
}
|
||||
|
||||
guard let correctedIndexPath = correctDestinationIndexPath(session: session) else {
|
||||
// We didn't hit the corrected indexPath, but this at least it gets the section right
|
||||
guard let section = destinationIndexPath?.section,
|
||||
let account = coordinator.nodeFor(section)?.representedObject as? Account,
|
||||
!account.hasChildWebFeed(withURL: sourceWebFeed.url) else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
return UITableViewDropProposal(operation: successOperation, intent: .insertAtDestinationIndexPath)
|
||||
}
|
||||
|
||||
guard correctedIndexPath.section > 0 else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
guard let correctDestNode = coordinator.nodeFor(correctedIndexPath),
|
||||
let correctDestFeed = correctDestNode.representedObject as? Feed,
|
||||
let correctDestAccount = correctDestFeed.account else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
// Validate account specific behaviors...
|
||||
if destAccount.behaviors.contains(.disallowFeedInMultipleFolders),
|
||||
let sourceNode = session.localDragSession?.items.first?.localObject as? Node,
|
||||
let sourceWebFeed = sourceNode.representedObject as? WebFeed,
|
||||
sourceWebFeed.account?.accountID != destAccount.accountID && destAccount.hasWebFeed(withURL: sourceWebFeed.url) {
|
||||
if correctDestAccount.behaviors.contains(.disallowFeedInMultipleFolders),
|
||||
sourceWebFeed.account?.accountID != correctDestAccount.accountID && correctDestAccount.hasWebFeed(withURL: sourceWebFeed.url) {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
|
||||
// Determine the correct drop proposal
|
||||
if destFeed is Folder {
|
||||
if session.location(in: destCell).y >= 0 {
|
||||
return UITableViewDropProposal(operation: .move, intent: .insertIntoDestinationIndexPath)
|
||||
if let correctFolder = correctDestFeed as? Folder {
|
||||
if correctFolder.hasChildWebFeed(withURL: sourceWebFeed.url) {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
} else {
|
||||
return UITableViewDropProposal(operation: .move, intent: .unspecified)
|
||||
return UITableViewDropProposal(operation: successOperation, intent: .insertIntoDestinationIndexPath)
|
||||
}
|
||||
} else {
|
||||
return UITableViewDropProposal(operation: .move, intent: .insertAtDestinationIndexPath)
|
||||
if let parentContainer = correctDestNode.parent?.representedObject as? Container, !parentContainer.hasChildWebFeed(withURL: sourceWebFeed.url) {
|
||||
return UITableViewDropProposal(operation: successOperation, intent: .insertAtDestinationIndexPath)
|
||||
} else {
|
||||
return UITableViewDropProposal(operation: .forbidden)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,33 +82,23 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
func tableView(_ tableView: UITableView, performDropWith dropCoordinator: UITableViewDropCoordinator) {
|
||||
guard let dragItem = dropCoordinator.items.first?.dragItem,
|
||||
let dragNode = dragItem.localObject as? Node,
|
||||
let source = dragNode.parent?.representedObject as? Container,
|
||||
let destIndexPath = dropCoordinator.destinationIndexPath else {
|
||||
return
|
||||
}
|
||||
|
||||
let isFolderDrop: Bool = {
|
||||
if coordinator.nodeFor(destIndexPath)?.representedObject is Folder, let propCell = tableView.cellForRow(at: destIndexPath) {
|
||||
return dropCoordinator.session.location(in: propCell).y >= 0
|
||||
}
|
||||
return false
|
||||
}()
|
||||
let source = dragNode.parent?.representedObject as? Container else {
|
||||
return
|
||||
}
|
||||
|
||||
// Based on the drop we have to determine a node to start looking for a parent container.
|
||||
let destNode: Node? = {
|
||||
guard let destIndexPath = correctDestinationIndexPath(session: dropCoordinator.session) else { return nil }
|
||||
|
||||
if isFolderDrop {
|
||||
return coordinator.nodeFor(destIndexPath)
|
||||
} else {
|
||||
if destIndexPath.row == 0 {
|
||||
return coordinator.nodeFor(IndexPath(row: 0, section: destIndexPath.section))
|
||||
} else if destIndexPath.row > 0 {
|
||||
return coordinator.nodeFor(IndexPath(row: destIndexPath.row - 1, section: destIndexPath.section))
|
||||
if coordinator.nodeFor(destIndexPath)?.representedObject is Folder {
|
||||
if dropCoordinator.proposal.intent == .insertAtDestinationIndexPath {
|
||||
return coordinator.nodeFor(destIndexPath.section)
|
||||
} else {
|
||||
return nil
|
||||
return coordinator.nodeFor(destIndexPath)
|
||||
}
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
}()
|
||||
|
||||
// Now we start looking for the parent container
|
||||
@@ -86,8 +106,11 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
if let container = (destNode?.representedObject as? Container) ?? (destNode?.parent?.representedObject as? Container) {
|
||||
return container
|
||||
} else {
|
||||
// We didn't hit the corrected indexPath, but this at least gets the section right
|
||||
guard let section = dropCoordinator.destinationIndexPath?.section else { return nil }
|
||||
|
||||
// If we got here, we are trying to drop on an empty section header. Go and find the Account for this section
|
||||
return coordinator.rootNode.childAtIndex(destIndexPath.section)?.representedObject as? Account
|
||||
return coordinator.nodeFor(section)?.representedObject as? Account
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -96,10 +119,25 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
if source.account == destination.account {
|
||||
moveWebFeedInAccount(feed: webFeed, sourceContainer: source, destinationContainer: destination)
|
||||
} else {
|
||||
moveWebFeedBetweenAccounts(feed: webFeed, sourceContainer: source, destinationContainer: destination)
|
||||
copyWebFeedBetweenAccounts(feed: webFeed, sourceContainer: source, destinationContainer: destination)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extension MasterFeedViewController {
|
||||
|
||||
func correctDestinationIndexPath(session: UIDropSession) -> IndexPath? {
|
||||
let location = session.location(in: tableView)
|
||||
|
||||
var correctDestination: IndexPath?
|
||||
tableView.performUsingPresentationValues {
|
||||
correctDestination = tableView.indexPathForRow(at: location)
|
||||
}
|
||||
|
||||
return correctDestination
|
||||
}
|
||||
|
||||
func moveWebFeedInAccount(feed: WebFeed, sourceContainer: Container, destinationContainer: Container) {
|
||||
guard sourceContainer !== destinationContainer else { return }
|
||||
|
||||
@@ -115,7 +153,7 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
func moveWebFeedBetweenAccounts(feed: WebFeed, sourceContainer: Container, destinationContainer: Container) {
|
||||
func copyWebFeedBetweenAccounts(feed: WebFeed, sourceContainer: Container, destinationContainer: Container) {
|
||||
|
||||
if let existingFeed = destinationContainer.account?.existingWebFeed(withURL: feed.url) {
|
||||
|
||||
@@ -123,15 +161,7 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
destinationContainer.account?.addWebFeed(existingFeed, to: destinationContainer) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
sourceContainer.account?.removeWebFeed(feed, from: sourceContainer) { result in
|
||||
BatchUpdate.shared.end()
|
||||
switch result {
|
||||
case .success:
|
||||
break
|
||||
case .failure(let error):
|
||||
self.presentError(error)
|
||||
}
|
||||
}
|
||||
BatchUpdate.shared.end()
|
||||
case .failure(let error):
|
||||
BatchUpdate.shared.end()
|
||||
self.presentError(error)
|
||||
@@ -144,15 +174,7 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
destinationContainer.account?.createWebFeed(url: feed.url, name: feed.editedName, container: destinationContainer, validateFeed: false) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
sourceContainer.account?.removeWebFeed(feed, from: sourceContainer) { result in
|
||||
BatchUpdate.shared.end()
|
||||
switch result {
|
||||
case .success:
|
||||
break
|
||||
case .failure(let error):
|
||||
self.presentError(error)
|
||||
}
|
||||
}
|
||||
BatchUpdate.shared.end()
|
||||
case .failure(let error):
|
||||
BatchUpdate.shared.end()
|
||||
self.presentError(error)
|
||||
@@ -164,3 +186,11 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
||||
|
||||
|
||||
}
|
||||
|
||||
private extension Container {
|
||||
|
||||
func hasChildWebFeed(withURL url: String) -> Bool {
|
||||
return topLevelWebFeeds.contains(where: { $0.url == url })
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import Account
|
||||
import Articles
|
||||
import RSCore
|
||||
@@ -16,13 +17,15 @@ import SafariServices
|
||||
class MasterFeedViewController: UITableViewController, UndoableCommandRunner, MainControllerIdentifiable {
|
||||
|
||||
@IBOutlet weak var filterButton: UIBarButtonItem!
|
||||
private var refreshProgressView: RefreshProgressView?
|
||||
@IBOutlet weak var addNewItemButton: UIBarButtonItem! {
|
||||
didSet {
|
||||
addNewItemButton.primaryAction = nil
|
||||
}
|
||||
}
|
||||
|
||||
let refreshProgressModel = RefreshProgressModel()
|
||||
lazy var progressBarViewController = UIHostingController(rootView: RefreshProgressView(progressBarMode: refreshProgressModel))
|
||||
|
||||
var mainControllerIdentifer = MainControllerIdentifier.masterFeed
|
||||
|
||||
weak var coordinator: SceneCoordinator!
|
||||
@@ -71,11 +74,17 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(configureContextMenu(_:)), name: .ActiveExtensionPointsDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange(_:)), name: .DisplayNameDidChange, object: nil)
|
||||
|
||||
refreshControl = UIRefreshControl()
|
||||
refreshControl!.addTarget(self, action: #selector(refreshAccounts(_:)), for: .valueChanged)
|
||||
refreshControl!.tintColor = .clear
|
||||
|
||||
progressBarViewController.view.backgroundColor = .clear
|
||||
progressBarViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
let refreshProgressItemButton = UIBarButtonItem(customView: progressBarViewController.view)
|
||||
toolbarItems?.insert(refreshProgressItemButton, at: 2)
|
||||
|
||||
configureToolbar()
|
||||
becomeFirstResponder()
|
||||
}
|
||||
|
||||
@@ -139,6 +148,13 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
}
|
||||
}
|
||||
|
||||
@objc func displayNameDidChange(_ note: Notification) {
|
||||
guard let object = note.object as? AnyObject else {
|
||||
return
|
||||
}
|
||||
reloadCell(for: object)
|
||||
}
|
||||
|
||||
@objc func contentSizeCategoryDidChange(_ note: Notification) {
|
||||
resetEstimatedRowHeight()
|
||||
tableView.reloadData()
|
||||
@@ -515,7 +531,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
|
||||
func updateFeedSelection(animations: Animations) {
|
||||
if let indexPath = coordinator.currentFeedIndexPath {
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations)
|
||||
if indexPath != tableView.indexPathForSelectedRow {
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations)
|
||||
}
|
||||
} else {
|
||||
if let indexPath = tableView.indexPathForSelectedRow {
|
||||
if animations.contains(.select) {
|
||||
@@ -587,7 +605,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
} else {
|
||||
setFilterButtonToInactive()
|
||||
}
|
||||
refreshProgressView?.update()
|
||||
refreshProgressModel.update()
|
||||
addNewItemButton?.isEnabled = !AccountManager.shared.activeAccounts.isEmpty
|
||||
|
||||
configureContextMenu()
|
||||
@@ -720,16 +738,6 @@ extension MasterFeedViewController: MasterFeedTableViewCellDelegate {
|
||||
|
||||
private extension MasterFeedViewController {
|
||||
|
||||
func configureToolbar() {
|
||||
guard let refreshProgressView = Bundle.main.loadNibNamed("RefreshProgressView", owner: self, options: nil)?[0] as? RefreshProgressView else {
|
||||
return
|
||||
}
|
||||
|
||||
self.refreshProgressView = refreshProgressView
|
||||
let refreshProgressItemButton = UIBarButtonItem(customView: refreshProgressView)
|
||||
toolbarItems?.insert(refreshProgressItemButton, at: 2)
|
||||
}
|
||||
|
||||
func setFilterButtonToActive() {
|
||||
filterButton?.image = AppAssets.filterActiveImage
|
||||
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Feeds", comment: "Selected - Filter Read Feeds")
|
||||
@@ -831,6 +839,12 @@ private extension MasterFeedViewController {
|
||||
completion(cell as! MasterFeedTableViewCell, indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
private func reloadCell(for object: AnyObject) {
|
||||
guard let indexPath = coordinator.indexPathFor(object) else { return }
|
||||
tableView.reloadRows(at: [indexPath], with: .none)
|
||||
restoreSelectionIfNecessary(adjustScroll: false)
|
||||
}
|
||||
|
||||
private func reloadAllVisibleCells(completion: (() -> Void)? = nil) {
|
||||
guard let indexPaths = tableView.indexPathsForVisibleRows else { return }
|
||||
@@ -1050,8 +1064,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command")
|
||||
let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, webFeed.nameForDisplay) as String
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let cancel = {
|
||||
completion(true)
|
||||
}
|
||||
@@ -1131,8 +1144,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let localizedMenuText = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, feed.nameForDisplay) as String
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in
|
||||
MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
if let articles = try? feed.fetchUnreadArticles() {
|
||||
@@ -1233,8 +1245,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command")
|
||||
let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, account.nameForDisplay) as String
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in
|
||||
MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
// If you don't have this delay the screen flashes when it executes this code
|
||||
|
||||
@@ -1,27 +1,82 @@
|
||||
//
|
||||
// RefeshProgressView.swift
|
||||
// NetNewsWire-iOS
|
||||
// ProgressBarView.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 10/24/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
// Created by Maurice Parker on 11/11/22.
|
||||
// Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
//
|
||||
// IndetermineProgressView inspired by https://daringsnowball.net/articles/indeterminate-linear-progress-view/
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import Account
|
||||
|
||||
class RefreshProgressView: UIView {
|
||||
struct RefreshProgressView: View {
|
||||
|
||||
@IBOutlet weak var progressView: UIProgressView!
|
||||
@IBOutlet weak var label: UILabel!
|
||||
static let width: CGFloat = 100
|
||||
static let height: CGFloat = 5
|
||||
|
||||
override func awakeFromNib() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
||||
update()
|
||||
scheduleUpdateRefreshLabel()
|
||||
@ObservedObject var refreshProgressModel: RefreshProgressModel
|
||||
@State private var offset: CGFloat = 0
|
||||
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = [.updatesFrequently, .notEnabled]
|
||||
init(progressBarMode: RefreshProgressModel) {
|
||||
self.refreshProgressModel = progressBarMode
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
if refreshProgressModel.isRefreshing {
|
||||
if refreshProgressModel.isIndeterminate {
|
||||
indeterminateProgressView
|
||||
} else {
|
||||
ProgressView(value: refreshProgressModel.progress)
|
||||
.progressViewStyle(LinearProgressViewStyle())
|
||||
.frame(width: Self.width, height: Self.height)
|
||||
}
|
||||
} else {
|
||||
Text(refreshProgressModel.label)
|
||||
.accessibilityLabel(refreshProgressModel.label)
|
||||
.font(.footnote)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
.frame(width: 200, height: 44)
|
||||
}
|
||||
|
||||
var indeterminateProgressView: some View {
|
||||
Rectangle()
|
||||
.foregroundColor(.gray.opacity(0.15))
|
||||
.overlay(
|
||||
Rectangle()
|
||||
.foregroundColor(Color.accentColor)
|
||||
.frame(width: Self.width * 0.26, height: Self.height)
|
||||
.clipShape(Capsule())
|
||||
.offset(x: -Self.width * 0.6, y: 0)
|
||||
.offset(x: Self.width * 1.2 * self.offset, y: 0)
|
||||
.animation(.default.repeatForever().speed(0.265), value: self.offset)
|
||||
.onAppear {
|
||||
withAnimation {
|
||||
self.offset = 1
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
self.offset = 0
|
||||
}
|
||||
)
|
||||
.clipShape(Capsule())
|
||||
.frame(width: Self.width, height: Self.height)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class RefreshProgressModel: ObservableObject {
|
||||
|
||||
@Published var isRefreshing = false
|
||||
@Published var isIndeterminate = false
|
||||
@Published var progress = 0.0
|
||||
@Published var label = String()
|
||||
|
||||
init() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil)
|
||||
}
|
||||
|
||||
func update() {
|
||||
@@ -31,52 +86,32 @@ class RefreshProgressView: UIView {
|
||||
updateRefreshLabel()
|
||||
}
|
||||
}
|
||||
|
||||
override func didMoveToSuperview() {
|
||||
progressChanged(animated: false)
|
||||
}
|
||||
|
||||
|
||||
@objc func progressDidChange(_ note: Notification) {
|
||||
progressChanged(animated: true)
|
||||
}
|
||||
|
||||
@objc func contentSizeCategoryDidChange(_ note: Notification) {
|
||||
// This hack is probably necessary because custom views in the toolbar don't get
|
||||
// notifications that the content size changed.
|
||||
label.font = UIFont.preferredFont(forTextStyle: .footnote)
|
||||
}
|
||||
|
||||
|
||||
deinit {
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private extension RefreshProgressView {
|
||||
|
||||
private extension RefreshProgressModel {
|
||||
|
||||
func progressChanged(animated: Bool) {
|
||||
// Layout may crash if not in the view hierarchy.
|
||||
// https://github.com/Ranchero-Software/NetNewsWire/issues/1764
|
||||
let isInViewHierarchy = self.superview != nil
|
||||
|
||||
let progress = AccountManager.shared.combinedRefreshProgress
|
||||
|
||||
if progress.isComplete {
|
||||
if isInViewHierarchy {
|
||||
progressView.setProgress(1, animated: animated)
|
||||
}
|
||||
let combinedRefreshProgress = AccountManager.shared.combinedRefreshProgress
|
||||
isIndeterminate = combinedRefreshProgress.isIndeterminate
|
||||
|
||||
if combinedRefreshProgress.isComplete {
|
||||
isRefreshing = false
|
||||
progress = 1
|
||||
|
||||
func completeLabel() {
|
||||
// Check that there are no pending downloads.
|
||||
if AccountManager.shared.combinedRefreshProgress.isComplete {
|
||||
self.updateRefreshLabel()
|
||||
self.label.isHidden = false
|
||||
self.progressView.isHidden = true
|
||||
if self.superview != nil {
|
||||
self.progressView.setProgress(0, animated: animated)
|
||||
}
|
||||
updateRefreshLabel()
|
||||
progress = 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,19 +123,16 @@ private extension RefreshProgressView {
|
||||
completeLabel()
|
||||
}
|
||||
} else {
|
||||
label.isHidden = true
|
||||
progressView.isHidden = false
|
||||
if isInViewHierarchy {
|
||||
let percent = Float(progress.numberCompleted) / Float(progress.numberOfTasks)
|
||||
isRefreshing = true
|
||||
let percent = Double(combinedRefreshProgress.numberCompleted) / Double(combinedRefreshProgress.numberOfTasks)
|
||||
|
||||
// Don't let the progress bar go backwards unless we need to go back more than 25%
|
||||
if percent > progressView.progress || progressView.progress - percent > 0.25 {
|
||||
progressView.setProgress(percent, animated: animated)
|
||||
}
|
||||
// Don't let the progress bar go backwards unless we need to go back more than 25%
|
||||
if percent > progress || (progress - percent) > 0.25 {
|
||||
progress = percent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func updateRefreshLabel() {
|
||||
if let accountLastArticleFetchEndTime = AccountManager.shared.lastArticleFetchEndTime {
|
||||
|
||||
@@ -111,17 +143,15 @@ private extension RefreshProgressView {
|
||||
let refreshed = relativeDateTimeFormatter.localizedString(for: accountLastArticleFetchEndTime, relativeTo: Date())
|
||||
let localizedRefreshText = NSLocalizedString("Updated %@", comment: "Updated")
|
||||
let refreshText = NSString.localizedStringWithFormat(localizedRefreshText as NSString, refreshed) as String
|
||||
label.text = refreshText
|
||||
label = refreshText
|
||||
|
||||
} else {
|
||||
label.text = NSLocalizedString("Updated Just Now", comment: "Updated Just Now")
|
||||
label = NSLocalizedString("Updated Just Now", comment: "Updated Just Now")
|
||||
}
|
||||
|
||||
} else {
|
||||
label.text = ""
|
||||
label = ""
|
||||
}
|
||||
|
||||
accessibilityLabel = label.text
|
||||
}
|
||||
|
||||
func scheduleUpdateRefreshLabel() {
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="ejl-zC-eNy" customClass="RefreshProgressView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="461" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Ds3-59-ooT" customClass="RoundedProgressView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="180.5" y="42.5" width="100" height="5"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="ReS-sT-7EN"/>
|
||||
<constraint firstAttribute="height" constant="5" id="oDX-bb-24H"/>
|
||||
</constraints>
|
||||
</progressView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7mJ-VZ-zqU">
|
||||
<rect key="frame" x="214" y="34" width="33" height="22"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="sNo-8i-tO3"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Ds3-59-ooT" firstAttribute="centerX" secondItem="ejl-zC-eNy" secondAttribute="centerX" id="5Rv-6l-HSL"/>
|
||||
<constraint firstItem="Ds3-59-ooT" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="ejl-zC-eNy" secondAttribute="leading" id="Bck-uf-0G7"/>
|
||||
<constraint firstItem="7mJ-VZ-zqU" firstAttribute="bottom" secondItem="sNo-8i-tO3" secondAttribute="bottom" id="DVn-hI-PhH"/>
|
||||
<constraint firstItem="7mJ-VZ-zqU" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="sNo-8i-tO3" secondAttribute="leading" id="Sbp-yf-ts9"/>
|
||||
<constraint firstItem="7mJ-VZ-zqU" firstAttribute="centerY" secondItem="ejl-zC-eNy" secondAttribute="centerY" id="Shb-X2-Fwc"/>
|
||||
<constraint firstItem="7mJ-VZ-zqU" firstAttribute="centerX" secondItem="ejl-zC-eNy" secondAttribute="centerX" id="lFg-fm-YmV"/>
|
||||
<constraint firstItem="sNo-8i-tO3" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="7mJ-VZ-zqU" secondAttribute="trailing" id="mZ2-XG-Kvg"/>
|
||||
<constraint firstItem="Ds3-59-ooT" firstAttribute="centerY" secondItem="ejl-zC-eNy" secondAttribute="centerY" id="tIh-lb-KbY"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Ds3-59-ooT" secondAttribute="trailing" id="vSU-N6-Sk5"/>
|
||||
</constraints>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="label" destination="7mJ-VZ-zqU" id="MHr-r4-qop"/>
|
||||
<outlet property="progressView" destination="Ds3-59-ooT" id="TjM-db-LxM"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-75" y="-117"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<systemColor name="secondaryLabelColor">
|
||||
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import RSCore
|
||||
import Account
|
||||
import Articles
|
||||
@@ -21,7 +22,9 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
|
||||
@IBOutlet weak var markAllAsReadButton: UIBarButtonItem!
|
||||
|
||||
private var refreshProgressView: RefreshProgressView!
|
||||
let refreshProgressModel = RefreshProgressModel()
|
||||
lazy var progressBarViewController = UIHostingController(rootView: RefreshProgressView(progressBarMode: refreshProgressModel))
|
||||
|
||||
private var refreshProgressItemButton: UIBarButtonItem!
|
||||
private var firstUnreadButton: UIBarButtonItem!
|
||||
|
||||
@@ -95,13 +98,14 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
|
||||
refreshControl = UIRefreshControl()
|
||||
refreshControl!.addTarget(self, action: #selector(refreshAccounts(_:)), for: .valueChanged)
|
||||
refreshControl!.tintColor = .clear
|
||||
|
||||
progressBarViewController.view.backgroundColor = .clear
|
||||
progressBarViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
refreshProgressItemButton = UIBarButtonItem(customView: progressBarViewController.view)
|
||||
|
||||
configureToolbar()
|
||||
|
||||
refreshProgressView = Bundle.main.loadNibNamed("RefreshProgressView", owner: self, options: nil)?[0] as? RefreshProgressView
|
||||
refreshProgressItemButton = UIBarButtonItem(customView: refreshProgressView!)
|
||||
|
||||
|
||||
resetUI(resetScroll: true)
|
||||
|
||||
// Load the table and then scroll to the saved position if available
|
||||
@@ -243,7 +247,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
}
|
||||
|
||||
func updateUI() {
|
||||
refreshProgressView?.update()
|
||||
refreshProgressModel.update()
|
||||
updateTitleUnreadCount()
|
||||
updateToolbar()
|
||||
}
|
||||
@@ -614,12 +618,6 @@ private extension MasterTimelineViewController {
|
||||
return
|
||||
}
|
||||
|
||||
guard let refreshProgressView = Bundle.main.loadNibNamed("RefreshProgressView", owner: self, options: nil)?[0] as? RefreshProgressView else {
|
||||
return
|
||||
}
|
||||
|
||||
self.refreshProgressView = refreshProgressView
|
||||
let refreshProgressItemButton = UIBarButtonItem(customView: refreshProgressView)
|
||||
toolbarItems?.insert(refreshProgressItemButton, at: 2)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 LucidaGrande-Bold;}
|
||||
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red10\green96\blue255;}
|
||||
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;\cssrgb\c0\c47843\c100000\cname systemBlueColor;}
|
||||
\margl1440\margr1440\vieww8340\viewh9300\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li363\fi-364\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\b\fs28 \cf2 By Brent Simmons and the Ranchero Software team
|
||||
\fs22 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
|
||||
{\field{\*\fldinst{HYPERLINK "https://netnewswire.com/"}}{\fldrslt
|
||||
\fs28 \cf3 netnewswire.com}}}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 930 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 930 KiB |
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon-1024px 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon-1024px.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
|
||||
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
|
||||
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0\cname textColor;}
|
||||
\margl1440\margr1440\vieww14220\viewh13280\viewkind0
|
||||
\deftab720
|
||||
\pard\pardeftab720\sa60\partightenfactor0
|
||||
|
||||
\f0\fs22 \cf2 Lead developer: {\field{\*\fldinst{HYPERLINK "https://github.com/vincode-io"}}{\fldrslt Maurice Parker}}\
|
||||
App icon: {\field{\*\fldinst{HYPERLINK "https://twitter.com/BradEllis"}}{\fldrslt Brad Ellis}}\
|
||||
Feedly syncing: {\field{\*\fldinst{HYPERLINK "https://twitter.com/kielgillard"}}{\fldrslt Kiel Gillard}}\
|
||||
NewsBlur syncing: {\field{\*\fldinst{HYPERLINK "https://twitter.com/quanganhdo"}}{\fldrslt Anh Do}}\
|
||||
Under-the-hood magic and CSS stylin\'92s: {\field{\*\fldinst{HYPERLINK "https://github.com/wevah"}}{\fldrslt Nate Weaver}}\
|
||||
Newsfoot (JS footnote displayer): {\field{\*\fldinst{HYPERLINK "https://github.com/brehaut/"}}{\fldrslt Andrew Brehaut}}\
|
||||
Help book: {\field{\*\fldinst{HYPERLINK "https://nostodnayr.net/"}}{\fldrslt Ryan Dotson}}\
|
||||
And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://github.com/danielpunkass"}}{\fldrslt Daniel Jalkut}}, {\field{\*\fldinst{HYPERLINK "https://rhonabwy.com/"}}{\fldrslt Joe Heck}}, {\field{\*\fldinst{HYPERLINK "https://github.com/olofhellman"}}{\fldrslt Olof Hellman}}, {\field{\*\fldinst{HYPERLINK "https://blog.rizwan.dev/"}}{\fldrslt Rizwan Mohamed Ibrahim}}, {\field{\*\fldinst{HYPERLINK "https://mynameisstuart.com/"}}{\fldrslt Stuart Breckenridge}}, {\field{\*\fldinst{HYPERLINK "https://twitter.com/philviso"}}{\fldrslt Phil Viso}}, and {\field{\*\fldinst{HYPERLINK "https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"}}{\fldrslt many more}}!\
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
|
||||
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
|
||||
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0\cname textColor;}
|
||||
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
||||
\deftab720
|
||||
\pard\pardeftab720\sa60\partightenfactor0
|
||||
|
||||
\f0\fs22 \cf2 NetNewsWire 6 is dedicated to everyone working to save democracy around the world.}
|
||||
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user