mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-29 02:42:47 -04:00
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:
@@ -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)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user