diff --git a/apple/Omnivore.xcodeproj/xcshareddata/xcschemes/Omnivore-iOS.xcscheme b/apple/Omnivore.xcodeproj/xcshareddata/xcschemes/Omnivore-iOS.xcscheme
index 68e486e5a..219adbd00 100644
--- a/apple/Omnivore.xcodeproj/xcshareddata/xcschemes/Omnivore-iOS.xcscheme
+++ b/apple/Omnivore.xcodeproj/xcshareddata/xcschemes/Omnivore-iOS.xcscheme
@@ -60,6 +60,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ enableThreadSanitizer = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
@@ -76,12 +77,13 @@
ReferencedContainer = "container:Omnivore.xcodeproj">
-
-
+
-
-
+
+
= LinkedItem.fetchRequest()
+ fetchRequest.sortDescriptors = [NSSortDescriptor(keyPath: \LinkedItem.savedAt, ascending: false)]
+ if let fetchedItems = try? dataService.viewContext.fetch(fetchRequest) {
+ self?.items = fetchedItems
+ self?.cursor = nil
+ self?.isLoading = false
+ }
+ }
},
receiveValue: { [weak self] result in
// Search results aren't guaranteed to return in order so this
@@ -200,7 +206,7 @@ import Views
}
func updateLabels(itemID _: String, labels _: [LinkedItemLabel]) {
- // TODO: fix
+ // TODO: -labels fix
// // If item is being being displayed then delay the state update of labels until
// // user is no longer reading the item.
// if selectedLinkItem != nil {
diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift
index e40d8741a..442c9453e 100644
--- a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift
@@ -4,7 +4,7 @@ import Services
import SwiftUI
import Views
-// TODO: fix file
+// TODO: -labels fix file
final class LabelsViewModel: ObservableObject {
private var hasLoadedInitialLabels = false
@Published var isLoading = false
diff --git a/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift b/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift
index 5d6bb1e73..69c63d494 100644
--- a/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift
@@ -76,7 +76,7 @@ enum PDFProvider {
let urlRequest = URLRequest.webRequest(
baseURL: dataService.appEnvironment.webAppBaseURL,
- urlPath: "/app/\(username)/\(item.slug)",
+ urlPath: "/app/\(username)/\(item.unwrappedSlug)",
queryParams: ["isAppEmbedView": "true", "highlightBarDisabled": isMacApp ? "false" : "true"]
)
diff --git a/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift b/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift
index 08f42eafb..328885e9e 100644
--- a/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift
+++ b/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift
@@ -11,7 +11,7 @@ public struct HomeFeedData {
}
}
-// TODO: delete this
+// TODO: -push-notification delete this?
// Internal model used for parsing a push notification object only
// struct JSONArticle: Decodable {
// let id: String
diff --git a/apple/OmnivoreKit/Sources/Models/DataModels/FeedItemLabelDep.swift b/apple/OmnivoreKit/Sources/Models/DataModels/FeedItemLabelDep.swift
deleted file mode 100644
index a6d4ff479..000000000
--- a/apple/OmnivoreKit/Sources/Models/DataModels/FeedItemLabelDep.swift
+++ /dev/null
@@ -1 +0,0 @@
-// TODO: delete file
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/CreateLabelPublisher.swift b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/CreateLabelPublisher.swift
index 0921c9607..c0c8deb39 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/CreateLabelPublisher.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/CreateLabelPublisher.swift
@@ -47,7 +47,7 @@ public extension DataService {
switch payload.data {
case let .saved(label: label):
- // TODO: update CoreData and fix this label thing
+ // TODO: -labels update CoreData and fix this label thing
// promise(.success(label))
promise(.failure(.message(messageText: "")))
case let .error(errorCode: errorCode):
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/RemoveLabelPublisher.swift b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/RemoveLabelPublisher.swift
index 40f11e5ae..49c258650 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/RemoveLabelPublisher.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/RemoveLabelPublisher.swift
@@ -37,7 +37,7 @@ public extension DataService {
switch payload.data {
case .success:
- // TODO: update CoreData
+ // TODO: -labels update CoreData
promise(.success(true))
case .error:
promise(.failure(.message(messageText: "Error removing label")))
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleLabelsPublisher.swift b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleLabelsPublisher.swift
index 07af48129..336b7035a 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleLabelsPublisher.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleLabelsPublisher.swift
@@ -45,7 +45,7 @@ public extension DataService {
switch payload.data {
case let .saved(labels):
- // TODO: update CoreData and fix dis
+ // TODO: -labels update CoreData and fix dis
promise(.failure(.message(messageText: "failed to set labels")))
// promise(.success(labels))
case .error:
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift
index 1b5b503c5..d5e2327de 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift
@@ -5,6 +5,7 @@ import Models
import SwiftGraphQL
public extension DataService {
+ // swiftlint:disable function_body_length
func updateArticleReadingProgressPublisher(
itemID: String,
readingProgress: Double,
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LabelsPublisher.swift b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LabelsPublisher.swift
index 799c79b99..6139a9ddd 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LabelsPublisher.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LabelsPublisher.swift
@@ -34,7 +34,7 @@ public extension DataService {
case let .success(payload):
switch payload.data {
case let .success(result: result):
- // TODO: update CoreData and fix this
+ // TODO: -labels update CoreData and fix this
// promise(.success(result))
promise(.failure(.unknown))
case .error:
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LibraryItemsQuery.swift b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LibraryItemsQuery.swift
index 4b68f1743..bb49eb6e8 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LibraryItemsQuery.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LibraryItemsQuery.swift
@@ -83,20 +83,6 @@ public extension DataService {
.receive(on: DispatchQueue.main)
.eraseToAnyPublisher()
}
-
- // TODO: delete
-// func cachedFeedItems() -> [FeedItem---D----ep] {
-// var result = [FeedItem------D---ep]()
-//
-// backgroundContext.performAndWait {
-// let fetchRequest: NSFetchRequest = LinkedItem.fetchRequest()
-// fetchRequest.sortDescriptors = [NSSortDescriptor(keyPath: \LinkedItem.savedAt, ascending: false)]
-// let items = (try? backgroundContext.fetch(fetchRequest)) ?? []
-// result = items.map { FeedItem-----D----ep.make(from: $0) }
-// }
-//
-// return result
-// }
}
let homeFeedItemSelection = Selection.Article {
diff --git a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift
index 725e884ae..1526b7802 100644
--- a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift
+++ b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift
@@ -75,7 +75,7 @@ struct InternalLinkedItem {
}
extension Sequence where Element == InternalLinkedItem {
- // TODO: use batch update?
+ // TODO: -optimization use batch update?
func persist(context: NSManagedObjectContext) -> [LinkedItem]? {
var linkedItems: [LinkedItem]?
context.performAndWait {
diff --git a/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift b/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift
index 285322828..9282dbfbc 100644
--- a/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift
+++ b/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift
@@ -32,7 +32,7 @@ public extension NSNotification {
return nil
}
- // TODO: re-enable later
+ // TODO: -push-notification re-enable later
// static func pushFeedItem(feedItem: FeedItem-----D---ep) {
// NotificationCenter.default.post(name: NSNotification.PushFeedItem, object: nil, userInfo: ["feedItem": feedItem])
// }
diff --git a/apple/Sources/PushNotificationConfig.swift b/apple/Sources/PushNotificationConfig.swift
index ce8a7d542..b53f86f72 100644
--- a/apple/Sources/PushNotificationConfig.swift
+++ b/apple/Sources/PushNotificationConfig.swift
@@ -55,7 +55,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
withCompletionHandler completionHandler: @escaping () -> Void
) {
let userInfo = response.notification.request.content.userInfo
- // TODO: fix
+ // TODO: -push-notification fix
// if let linkData = userInfo["link"] as? String {
// guard let jsonData = Data(base64Encoded: linkData) else { return }
// if let item = FeedItem---D--ep.fromJsonArticle(linkData: jsonData) {