Skip to content

Commit f039f69

Browse files
committed
fix: detect unsaved changes from live DataChangeManager, not just snapshotted tab state
1 parent fb53f58 commit f039f69

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

TablePro/Views/Main/MainContentCoordinator.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,13 @@ final class MainContentCoordinator {
253253
/// Check whether any active coordinator has unsaved edits.
254254
static func hasAnyUnsavedChanges() -> Bool {
255255
activeCoordinators.values.contains { coordinator in
256-
coordinator.tabManager.tabs.contains { $0.pendingChanges.hasChanges }
256+
coordinator.changeManager.hasChanges
257+
|| coordinator.tabManager.tabs.contains { $0.pendingChanges.hasChanges }
257258
}
258259
}
259260

261+
262+
260263
/// Collect all tabs from all active coordinators for a given connectionId.
261264
static func allTabs(for connectionId: UUID) -> [QueryTab] {
262265
activeCoordinators.values

0 commit comments

Comments
 (0)