mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Implement incremental iCloud sync
This commit is contained in:
@@ -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", .branch("main")),
|
||||
.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")),
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
@@ -39,7 +39,7 @@ class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate, Logging {
|
||||
case .success(let pendingStarredStatusArticleIDs):
|
||||
|
||||
self.delete(recordKeys: deleted, pendingStarredStatusArticleIDs: pendingStarredStatusArticleIDs) {
|
||||
self.update(records: changed,
|
||||
self.update(records: updated,
|
||||
pendingReadStatusArticleIDs: pendingReadStatusArticleIDs,
|
||||
pendingStarredStatusArticleIDs: pendingStarredStatusArticleIDs,
|
||||
completion: completion)
|
||||
|
||||
@@ -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", .branch("main")),
|
||||
],
|
||||
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", .branch("main")),
|
||||
.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")),
|
||||
]
|
||||
|
||||
@@ -4941,8 +4941,8 @@
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/Ranchero-Software/RSCore.git";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.0.0;
|
||||
branch = main;
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
510ECA4024D1DCD0001C31A6 /* XCRemoteSwiftPackageReference "RSTree" */ = {
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
"package": "RSCore",
|
||||
"repositoryURL": "https://github.com/Ranchero-Software/RSCore.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "a2f711d64af8f1baefdf0092f57a7f0df7f0e5e8",
|
||||
"version": "1.0.15"
|
||||
"branch": "main",
|
||||
"revision": "8a9c3e46449a9ea2c898aebcb37aad08ceeef7d9",
|
||||
"version": null
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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", .branch("main")),
|
||||
.package(url: "https://github.com/Ranchero-Software/RSDatabase.git", .upToNextMajor(from: "1.0.0")),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user