Skip to content

Commit f3d0773

Browse files
committed
Rename calculateNewExpandedState -> updateItemInExpandedState
1 parent 1a08ae4 commit f3d0773

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

extensions/ql-vscode/src/databases/db-item-expansion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface RemoteUserDefinedListExpandedDbItem {
3131
listName: string;
3232
}
3333

34-
export function calculateNewExpandedState(
34+
export function updateItemInExpandedState(
3535
currentExpandedItems: ExpandedDbItem[],
3636
dbItem: DbItem,
3737
itemExpanded: boolean,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AppEvent, AppEventEmitter } from "../common/events";
33
import { ValueResult } from "../common/value-result";
44
import { DbConfigStore } from "./config/db-config-store";
55
import { DbItem, DbListKind } from "./db-item";
6-
import { calculateNewExpandedState, ExpandedDbItem } from "./db-item-expansion";
6+
import { updateItemInExpandedState, ExpandedDbItem } from "./db-item-expansion";
77
import {
88
getSelectedDbItem,
99
mapDbItemToSelectedDbItem,
@@ -74,7 +74,7 @@ export class DbManager {
7474

7575
const currentExpandedItems = this.getCurrentExpandedItems();
7676

77-
const newExpandedItems = calculateNewExpandedState(
77+
const newExpandedItems = updateItemInExpandedState(
7878
currentExpandedItems,
7979
dbItem,
8080
itemExpanded,

extensions/ql-vscode/test/unit-tests/databases/db-item-expansion.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
RootRemoteDbItem,
44
} from "../../../src/databases/db-item";
55
import {
6-
calculateNewExpandedState,
6+
updateItemInExpandedState,
77
ExpandedDbItem,
88
ExpandedDbItemKind,
99
} from "../../../src/databases/db-item-expansion";
@@ -29,7 +29,7 @@ describe("db item expansion", () => {
2929
listName: "list2",
3030
});
3131

32-
const newExpandedItems = calculateNewExpandedState(
32+
const newExpandedItems = updateItemInExpandedState(
3333
currentExpandedItems,
3434
dbItem,
3535
true,
@@ -50,7 +50,7 @@ describe("db item expansion", () => {
5050
listName: "list2",
5151
});
5252

53-
const newExpandedItems = calculateNewExpandedState([], dbItem, true);
53+
const newExpandedItems = updateItemInExpandedState([], dbItem, true);
5454

5555
expect(newExpandedItems).toEqual([
5656
{
@@ -76,7 +76,7 @@ describe("db item expansion", () => {
7676
listName: "list1",
7777
});
7878

79-
const newExpandedItems = calculateNewExpandedState(
79+
const newExpandedItems = updateItemInExpandedState(
8080
currentExpandedItems,
8181
dbItem,
8282
false,
@@ -98,7 +98,7 @@ describe("db item expansion", () => {
9898

9999
const dbItem: RootRemoteDbItem = createRootRemoteDbItem();
100100

101-
const newExpandedItems = calculateNewExpandedState(
101+
const newExpandedItems = updateItemInExpandedState(
102102
currentExpandedItems,
103103
dbItem,
104104
false,

0 commit comments

Comments
 (0)