feat: Implement photo performance optimization and introduce new photo management features

- Added a comprehensive document detailing performance optimizations for the photo grid, addressing issues with loading and caching.
- Introduced `PhotoThumbnailCache` for efficient thumbnail management, leveraging `PHCachingImageManager` and `NSCache`.
- Updated `PhotoManager2` to utilize a singleton pattern for shared access and improved photo loading strategies.
- Enhanced `PhotosViewModel` and `PhotosView` to support pagination and optimized thumbnail loading for smoother user experience.
- Created new views and components for managing photo backups and displaying photo details, including a job monitor for background tasks.
- Refactored existing code to improve structure and maintainability, ensuring better performance with large photo libraries.
This commit is contained in:
Jamie Pine
2025-10-04 15:24:49 -07:00
parent 936d0142d5
commit 32bcf8dc26

View File

@@ -163,7 +163,10 @@ public class SpacedriveClient {
// Encode input to JSON for non-unit types
let requestData: Data
do {
requestData = try JSONEncoder().encode(requestPayload)
let encoder = JSONEncoder()
// Don't omit nil values - we need them to be present as null
// This is handled by the Codable implementation of the structs
requestData = try encoder.encode(requestPayload)
} catch {
throw SpacedriveError.serializationError("Failed to encode request: \(error)")
}