File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,13 +336,14 @@ struct MainContentView: View {
336336 // Skip if the user has unsaved changes (in-memory or tab-level).
337337 let hasPendingEdits = changeManager. hasChanges
338338 || ( tabManager. selectedTab? . pendingChanges. hasChanges ?? false )
339+ let isConnected = DatabaseManager . shared. activeSessions [ connection. id] ? . isConnected ?? false
339340 let needsLazyLoad = tabManager. selectedTab. map { tab in
340341 tab. tabType == . table
341342 && ( tab. resultRows. isEmpty || tab. rowBuffer. isEvicted)
342343 && ( tab. lastExecutedAt == nil || tab. rowBuffer. isEvicted)
343344 && !tab. query. trimmingCharacters ( in: . whitespacesAndNewlines) . isEmpty
344345 } ?? false
345- if needsLazyLoad && !hasPendingEdits {
346+ if needsLazyLoad && !hasPendingEdits && isConnected {
346347 coordinator. runQuery ( )
347348 }
348349 }
You can’t perform that action at this time.
0 commit comments