Fix OTG album local path storage
This commit is contained in:
@ -18,7 +18,7 @@ enum TravelAlbumCameraImportState: Equatable {
|
||||
case loading
|
||||
case loaded(sections: [TravelAlbumCameraImportSection])
|
||||
case importing(current: Int, total: Int)
|
||||
case finished(importedCount: Int)
|
||||
case finished(importedCount: Int, failedCount: Int)
|
||||
case failed(message: String)
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ final class TravelAlbumCameraImportViewModel {
|
||||
id: object.id,
|
||||
sourceId: object.id,
|
||||
fileName: downloadedURL.lastPathComponent,
|
||||
localPath: downloadedURL.path,
|
||||
localPath: storage.relativePath(for: downloadedURL, albumId: albumId),
|
||||
thumbnailPath: "",
|
||||
capturedAt: TravelAlbumOTGPhotoStore.transferTimeText(object.capturedAt),
|
||||
fileSizeBytes: object.fileSize,
|
||||
@ -212,7 +212,7 @@ final class TravelAlbumCameraImportViewModel {
|
||||
}
|
||||
|
||||
selectedPhotoIds.subtract(existingPhotoIds)
|
||||
state = .finished(importedCount: importedCount)
|
||||
state = .finished(importedCount: importedCount, failedCount: failedPhotoIds.count)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user