Skip to content

Commit ecda976

Browse files
committed
fix: skip auto-reload from stale cache during database switch
1 parent eaf7f75 commit ecda976

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

TablePro/Views/Sidebar/SidebarView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ struct SidebarView: View {
117117
}
118118
.onChange(of: tables) { _, newTables in
119119
let hasSession = DatabaseManager.shared.activeSessions[connectionId] != nil
120-
if newTables.isEmpty && hasSession && !viewModel.isLoading {
120+
if newTables.isEmpty && hasSession && !viewModel.isLoading
121+
&& coordinator?.isSwitchingDatabase != true
122+
{
121123
viewModel.loadTables()
122124
}
123125
}

0 commit comments

Comments
 (0)