From b41a0062b812bb5d92a9a635a98de77fe715a290 Mon Sep 17 00:00:00 2001 From: Dallas Groot Date: Sun, 12 Apr 2026 19:49:05 -0700 Subject: [PATCH] Captured remaining into let finalRemaining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • BackupManager — replaced barCount/gain/colorScheme with the 18 actual VisualizerSettings properties on both export and import sides • PendingOperationsQueue — captured remaining into let finalRemaining before MainActor.run closure (Swift 6 concurrency), changed try? CompanionAPIService() to CompanionAPIService.shared • Widget — removed unused barWidth • Version — both plists now use $(MARKETING_VERSION) The localization warning about String Catalog Symbol Generation is an Xcode recommendation, not an error — you can dismiss it or enable it in project settings. --- iOS/Data/PendingOperationsQueue.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/iOS/Data/PendingOperationsQueue.swift b/iOS/Data/PendingOperationsQueue.swift index 10c1172..ec1483e 100644 --- a/iOS/Data/PendingOperationsQueue.swift +++ b/iOS/Data/PendingOperationsQueue.swift @@ -122,16 +122,19 @@ class PendingOperationsQueue: ObservableObject { } } + // Copy to let for safe capture in MainActor.run (Swift 6 concurrency) + let finalRemaining = remaining + await MainActor.run { - self.operations = remaining + self.operations = finalRemaining self.saveToDisk() self.isProcessing = false - if remaining.isEmpty { + if finalRemaining.isEmpty { DebugLogger.shared.log("All pending ops completed", category: "PendingOps") } else { DebugLogger.shared.log( - "\(remaining.count) ops still pending after retry", + "\(finalRemaining.count) ops still pending after retry", category: "PendingOps" ) } @@ -140,7 +143,7 @@ class PendingOperationsQueue: ObservableObject { } private func retryOperation(_ op: PendingOperation) async -> Bool { - guard let api = try? CompanionAPIService() else { return false } + let api = CompanionAPIService.shared switch op.type { case .metadataEdit: