open server connection when opening DB connection

This commit is contained in:
Jan Prochazka 2022-05-19 12:26:28 +02:00
parent 96b2c7280d
commit 566082d40f

View File

@ -187,6 +187,10 @@ export const getPinnedDatabases = () => _.compact(pinnedDatabasesValue);
let currentDatabaseValue = null;
currentDatabase.subscribe(value => {
currentDatabaseValue = value;
if (value?.connection?._id) {
openedConnections.update(x => _.uniq([...x, value?.connection?._id]));
expandedConnections.update(x => _.uniq([...x, value?.connection?._id]));
}
invalidateCommands();
});
export const getCurrentDatabase = () => currentDatabaseValue;