Compare commits
No commits in common. "73ab2136313a9b5eea23759ab4995c16c03607e1" and "402e12a074f0e2b8ac06192e7d8126d8648f0aab" have entirely different histories.
73ab213631
...
402e12a074
|
@ -103,11 +103,9 @@ public actor FervorClient: Sendable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func syncItems(lastSync: Date?) async throws -> ItemsSyncUpdate {
|
public func syncItems(lastSync: Date?) async throws -> ItemsSyncUpdate {
|
||||||
var query: [URLQueryItem] = []
|
let request = URLRequest(url: buildURL(path: "/api/v1/items/sync", queryItems: [
|
||||||
if let lastSync {
|
URLQueryItem(name: "last_sync", value: lastSync?.formatted(.iso8601))
|
||||||
query.append(URLQueryItem(name: "last_sync", value: lastSync.formatted(.iso8601)))
|
]))
|
||||||
}
|
|
||||||
let request = URLRequest(url: buildURL(path: "/api/v1/items/sync", queryItems: query))
|
|
||||||
return try await performRequest(request)
|
return try await performRequest(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ public class PersistentContainer: NSPersistentContainer, @unchecked Sendable {
|
||||||
// if it's parented to the viewContext, it blocks the viewContext (and potentially the main thread) when it needs to look things up
|
// if it's parented to the viewContext, it blocks the viewContext (and potentially the main thread) when it needs to look things up
|
||||||
context.persistentStoreCoordinator = self.persistentStoreCoordinator
|
context.persistentStoreCoordinator = self.persistentStoreCoordinator
|
||||||
context.automaticallyMergesChangesFromParent = true
|
context.automaticallyMergesChangesFromParent = true
|
||||||
context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump
|
|
||||||
return context
|
return context
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -66,7 +65,6 @@ public class PersistentContainer: NSPersistentContainer, @unchecked Sendable {
|
||||||
}
|
}
|
||||||
|
|
||||||
viewContext.automaticallyMergesChangesFromParent = true
|
viewContext.automaticallyMergesChangesFromParent = true
|
||||||
viewContext.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>_XCCurrentVersionName</key>
|
<key>_XCCurrentVersionName</key>
|
||||||
<string>Reader 3.xcdatamodel</string>
|
<string>Reader 2.xcdatamodel</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21513" systemVersion="22C65" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21279" systemVersion="22A5331f" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
||||||
<entity name="Feed" representedClassName="Feed" syncable="YES">
|
<entity name="Feed" representedClassName="Feed" syncable="YES">
|
||||||
<attribute name="id" attributeType="String"/>
|
<attribute name="id" attributeType="String"/>
|
||||||
<attribute name="lastUpdated" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
<attribute name="lastUpdated" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
||||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21513" systemVersion="22C65" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
|
||||||
<entity name="Feed" representedClassName="Feed" syncable="YES">
|
|
||||||
<attribute name="id" attributeType="String"/>
|
|
||||||
<attribute name="lastUpdated" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
|
||||||
<attribute name="title" attributeType="String"/>
|
|
||||||
<attribute name="url" optional="YES" attributeType="URI"/>
|
|
||||||
<relationship name="groups" toMany="YES" deletionRule="Nullify" destinationEntity="Group" inverseName="feeds" inverseEntity="Group"/>
|
|
||||||
<relationship name="items" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Item" inverseName="feed" inverseEntity="Item"/>
|
|
||||||
</entity>
|
|
||||||
<entity name="Group" representedClassName="Group" syncable="YES">
|
|
||||||
<attribute name="id" attributeType="String"/>
|
|
||||||
<attribute name="title" attributeType="String"/>
|
|
||||||
<relationship name="feeds" toMany="YES" deletionRule="Nullify" destinationEntity="Feed" inverseName="groups" inverseEntity="Feed"/>
|
|
||||||
</entity>
|
|
||||||
<entity name="Item" representedClassName="Item" versionHashModifier="5" syncable="YES">
|
|
||||||
<attribute name="author" optional="YES" attributeType="String"/>
|
|
||||||
<attribute name="content" optional="YES" attributeType="String"/>
|
|
||||||
<attribute name="excerpt" optional="YES" attributeType="String"/>
|
|
||||||
<attribute name="generatedExcerpt" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
|
|
||||||
<attribute name="id" attributeType="String"/>
|
|
||||||
<attribute name="needsReadStateSync" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
|
|
||||||
<attribute name="published" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
|
||||||
<attribute name="read" attributeType="Boolean" usesScalarValueType="YES"/>
|
|
||||||
<attribute name="title" optional="YES" attributeType="String"/>
|
|
||||||
<attribute name="url" optional="YES" attributeType="URI"/>
|
|
||||||
<relationship name="feed" maxCount="1" deletionRule="Nullify" destinationEntity="Feed" inverseName="items" inverseEntity="Feed"/>
|
|
||||||
<fetchIndex name="byID">
|
|
||||||
<fetchIndexElement property="id" type="Binary" order="ascending"/>
|
|
||||||
</fetchIndex>
|
|
||||||
<fetchIndex name="byRead">
|
|
||||||
<fetchIndexElement property="read" type="Binary" order="ascending"/>
|
|
||||||
</fetchIndex>
|
|
||||||
</entity>
|
|
||||||
<entity name="SyncState" representedClassName="SyncState" syncable="YES" codeGenerationType="class">
|
|
||||||
<attribute name="lastSync" attributeType="Date" usesScalarValueType="NO"/>
|
|
||||||
</entity>
|
|
||||||
<fetchRequest name="FetchRequest" entity="Item" predicateString="TRUEPREDICATE"/>
|
|
||||||
</model>
|
|
|
@ -595,7 +595,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/bash;
|
shellPath = /bin/bash;
|
||||||
shellScript = "pushd \"$PROJECT_DIR/lol-html/c-api/\"\n\nbuild() {\n echo \"Building lol-html with CARGO_TARGET: $1\"\n\n ~/.cargo/bin/cargo build --release --target $1\n rm target/$1/release/liblolhtml.dylib\n}\n\nbuild_std() {\n echo \"Building lol-html with CARGO_TARGET: $1\"\n echo \"Building std enabled\"\n \n ~/.cargo/bin/cargo +nightly build -Z build-std=panic_abort,std --release --target $1\n # cargo creates the .dylib and .a in the same location, and we want to force xcode to link against the static archive\n rm target/$1/release/liblolhtml.dylib\n}\n\nif [ \"$PLATFORM_NAME\" == \"iphonesimulator\" ]; then\n if [ \"$ARCHS\" == \"arm64\" ]; then\n build_std \"aarch64-apple-ios-sim\"\n elif [ \"$ARCHS\" == \"x86_64\" ]; then\n build \"x86_64-apple-ios\"\n else\n echo \"error: unknown value for \\$ARCHS\"\n exit 1\n fi\nelif [ \"$PLATFORM_NAME\" == \"iphoneos\" ]; then\n build_std \"aarch64-apple-ios\"\nelif [ \"$PLATFORM_NAME\" == \"macosx\" ]; then\n if grep -q \"arm64\" <<< \"$ARCHS\"; then\n build_std \"aarch64-apple-ios-macabi\"\n fi\n if grep -q \"x86_64\" <<< \"$ARCHS\"; then\n build_std \"x86_64-apple-ios-macabi\"\n fi\nelse\n echo \"error: unknown value for \\$PLATFORM_NAME\"\n exit 1\nfi\n";
|
shellScript = "pushd \"$PROJECT_DIR/lol-html/c-api/\"\n\nbuild() {\n echo \"Building lol-html with CARGO_TARGET: $1\"\n\n ~/.cargo/bin/cargo build --release --target $1\n}\n\nbuild_std() {\n echo \"Building lol-html with CARGO_TARGET: $1\"\n echo \"Building std enabled\"\n \n ~/.cargo/bin/cargo +nightly build -Z build-std=panic_abort,std --release --target $1\n}\n\nif [ \"$PLATFORM_NAME\" == \"iphonesimulator\" ]; then\n if [ \"$ARCHS\" == \"arm64\" ]; then\n build_std \"aarch64-apple-ios-sim\"\n elif [ \"$ARCHS\" == \"x86_64\" ]; then\n build \"x86_64-apple-ios\"\n else\n echo \"error: unknown value for \\$ARCHS\"\n exit 1\n fi\nelif [ \"$PLATFORM_NAME\" == \"iphoneos\" ]; then\n build_std \"aarch64-apple-ios\"\nelif [ \"$PLATFORM_NAME\" == \"macosx\" ]; then\n if grep -q \"arm64\" <<< \"$ARCHS\"; then\n build_std \"aarch64-apple-ios-macabi\"\n fi\n if grep -q \"x86_64\" <<< \"$ARCHS\"; then\n build_std \"x86_64-apple-ios-macabi\"\n fi\nelse\n echo \"error: unknown value for \\$PLATFORM_NAME\"\n exit 1\nfi\n";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,7 @@ struct WidgetHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let item = prioritizedItems.first {
|
logger.info("Saving widget data with first item: '\(prioritizedItems.first!.title ?? "<untitled>", privacy: .public)'")
|
||||||
logger.info("Saving widget data with first item: '\(item.title ?? "<untitled>", privacy: .public)'")
|
|
||||||
}
|
|
||||||
|
|
||||||
WidgetData(recentItems: prioritizedItems).save(account: fervorController.account!)
|
WidgetData(recentItems: prioritizedItems).save(account: fervorController.account!)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue