@@ -93,6 +93,7 @@ struct ContentView: View {
9393 AppState . shared. isConnected = true
9494 AppState . shared. safeModeLevel = session. connection. safeModeLevel
9595 AppState . shared. editorLanguage = PluginManager . shared. editorLanguage ( for: session. connection. type)
96+ AppState . shared. currentDatabaseType = session. connection. type
9697 AppState . shared. supportsDatabaseSwitching = PluginManager . shared. supportsDatabaseSwitching (
9798 for: session. connection. type)
9899 }
@@ -119,6 +120,7 @@ struct ContentView: View {
119120 AppState . shared. isConnected = false
120121 AppState . shared. safeModeLevel = . silent
121122 AppState . shared. editorLanguage = . sql
123+ AppState . shared. currentDatabaseType = nil
122124 AppState . shared. supportsDatabaseSwitching = true
123125
124126 // Close all native tab windows for this connection and
@@ -150,6 +152,7 @@ struct ContentView: View {
150152 AppState . shared. isConnected = true
151153 AppState . shared. safeModeLevel = newSession. connection. safeModeLevel
152154 AppState . shared. editorLanguage = PluginManager . shared. editorLanguage ( for: newSession. connection. type)
155+ AppState . shared. currentDatabaseType = newSession. connection. type
153156 AppState . shared. supportsDatabaseSwitching = PluginManager . shared. supportsDatabaseSwitching (
154157 for: newSession. connection. type)
155158 }
@@ -179,12 +182,14 @@ struct ContentView: View {
179182 AppState . shared. isConnected = true
180183 AppState . shared. safeModeLevel = session. connection. safeModeLevel
181184 AppState . shared. editorLanguage = PluginManager . shared. editorLanguage ( for: session. connection. type)
185+ AppState . shared. currentDatabaseType = session. connection. type
182186 AppState . shared. supportsDatabaseSwitching = PluginManager . shared. supportsDatabaseSwitching (
183187 for: session. connection. type)
184188 } else {
185189 AppState . shared. isConnected = false
186190 AppState . shared. safeModeLevel = . silent
187191 AppState . shared. editorLanguage = . sql
192+ AppState . shared. currentDatabaseType = nil
188193 AppState . shared. supportsDatabaseSwitching = true
189194 }
190195 }
0 commit comments