Improved progress display

Previously, the progress bar updated only after completing an entire table.

For large tables such as LIBARC, this could make the application appear to have stopped responding.

Phase 10 updates the interface while rows are being exported.
This commit is contained in:
Mark Gregory
2026-10-18 14:34:02 +01:00
parent 312efaa771
commit 0891230b39
2 changed files with 10 additions and 5 deletions
+5 -5
View File
@@ -5635,7 +5635,7 @@ private struct WorkbenchTableSearchSheet: View {
password: PasswordStore.read(profile.id), sql: sql)
columns = result.rows.compactMap { $0.first }
column = columns.first ?? ""
} catch { error = error.localizedDescription }
} catch let caughtError { error = caughtError.localizedDescription }
}
}
}
@@ -5740,7 +5740,7 @@ private struct WorkbenchCSVImportSheet: View {
progress = 0
completed = false
prepareMapping()
} catch { error = error.localizedDescription }
} catch let caughtError { error = caughtError.localizedDescription }
}
private func prepareMapping() {
@@ -5764,7 +5764,7 @@ private struct WorkbenchCSVImportSheet: View {
password: PasswordStore.read(profile.id), sql: sql)
availableColumns = result.rows.compactMap(\.first)
prepareMapping()
} catch { error = error.localizedDescription }
} catch let caughtError { error = caughtError.localizedDescription }
}
private func importRows() async {
@@ -5801,8 +5801,8 @@ private struct WorkbenchCSVImportSheet: View {
}
completed = true
model.loadTables(database: target.database)
} catch {
error = "Stopped after \(progress) rows: \(error.localizedDescription). Previously inserted rows may remain."
} catch let caughtError {
error = "Stopped after \(progress) rows: \(caughtError.localizedDescription). Previously inserted rows may remain."
}
busy = false
}