fix: 10 audit fixes — memory safety, performance, accessibility, architecture
- Add a11y label to ProgressMapView reset button and progress bar values - Fix CADisplayLink retain cycle in ItineraryTableViewController via deinit - Add [weak self] to PhotoGalleryViewModel Task closure - Add @MainActor to TripWizardViewModel, remove manual MainActor.run hop - Fix O(n²) rank lookup in PollDetailView/DebugPollPreviewView with enumerated() - Cache itinerarySections via ItinerarySectionBuilder static extraction + @State - Convert CanonicalSyncService/BootstrapService from actor to @MainActor final class - Add .accessibilityHidden(true) to RegionMapSelector Map to prevent duplicate VoiceOver Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -372,20 +372,20 @@ final class PhotoGalleryViewModel {
|
||||
}
|
||||
|
||||
isLoadingFullImage = true
|
||||
Task {
|
||||
Task { [weak self] in
|
||||
do {
|
||||
let image = try await photoService.fetchFullImage(for: metadata)
|
||||
fullResolutionImage = image
|
||||
let image = try await self?.photoService.fetchFullImage(for: metadata)
|
||||
self?.fullResolutionImage = image
|
||||
} catch let error as PhotoServiceError {
|
||||
self.error = error
|
||||
self?.error = error
|
||||
// Fall back to thumbnail
|
||||
if let data = metadata.thumbnailData {
|
||||
fullResolutionImage = UIImage(data: data)
|
||||
self?.fullResolutionImage = UIImage(data: data)
|
||||
}
|
||||
} catch {
|
||||
self.error = .downloadFailed(error.localizedDescription)
|
||||
self?.error = .downloadFailed(error.localizedDescription)
|
||||
}
|
||||
isLoadingFullImage = false
|
||||
self?.isLoadingFullImage = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user