Skip to content

Commit 6774306

Browse files
committed
* #RIVS-258 - Change analytics page text for vscode
* #RIVS-245 - [Regression] Cli does not connect to the database when opened for the first time * #RIVS-247 - [Regression] Invalid database is displayed for some period of time after installing the extension
1 parent 37f07ac commit 6774306

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/webviews/src/actions/processCliAction.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ export const processCliAction = (message: PostMessage) => {
1010
return
1111
}
1212

13+
const prevDatabaseId = useDatabasesStore.getState().connectedDatabase?.id
1314
const database = message?.data?.database
15+
16+
if (prevDatabaseId === database?.id) {
17+
return
18+
}
1419
window.ri.database = database
20+
addCli()
1521

1622
useDatabasesStore.getState().setConnectedDatabase(database)
17-
addCli(database)
1823
}

src/webviews/src/modules/cli/components/cli-body/CliBodyWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const CliBodyWrapper = () => {
6363

6464
useEffect(() => {
6565
!cliClientUuid && host && createCliClientAction(database!)
66+
resetCommand()
6667
return () => {
6768
removeCliClient()
6869
}

src/webviews/src/modules/cli/hooks/cli-settings/useCliSettingsThunks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ function updateCliHistory() {
185185
}
186186

187187
// async thunk function
188-
export function addCli(database: Database) {
188+
export function addCli() {
189189
updateCliHistory()
190190
useCliOutputStore.getState().resetOutput()
191-
createCliClientAction(database)
191+
useCliSettingsStore.getState().resetCliClientUuid()
192192
}
193193

194194
// async thunk function

0 commit comments

Comments
 (0)