Captured remaining into let finalRemaining

•	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.
This commit is contained in:
Dallas Groot 2026-04-12 19:49:05 -07:00
parent b8f3544395
commit b41a0062b8

View file

@ -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: