Skip to content

Commit ba830dd

Browse files
committed
Fix expanded bug when renaming lists
1 parent c36da4b commit ba830dd

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

extensions/ql-vscode/src/databases/db-manager.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,16 @@ export class DbManager {
8282
}
8383

8484
public async removeDbItemFromExpandedState(dbItem: DbItem): Promise<void> {
85+
// When collapsing or expanding a list we clean up the expanded state and remove
86+
// all items that don't exist anymore.
87+
8588
await this.updateDbItemExpandedState(dbItem, false);
8689
}
8790

8891
public async addDbItemToExpandedState(dbItem: DbItem): Promise<void> {
92+
// When collapsing or expanding a list we clean up the expanded state and remove
93+
// all items that don't exist anymore.
94+
8995
await this.updateDbItemExpandedState(dbItem, true);
9096
}
9197

@@ -133,7 +139,7 @@ export class DbManager {
133139
newDbItem,
134140
);
135141

136-
await this.updateExpandedItems(newExpandedItems);
142+
await this.setExpandedItems(newExpandedItems);
137143
}
138144

139145
public async renameLocalDb(

0 commit comments

Comments
 (0)