Skip to content

Commit 6ffa7ee

Browse files
committed
Fixed 'Start work' not working if another Start work tab is open
1 parent 6156d53 commit 6ffa7ee

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/react/atlascode/startwork/startWorkController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export type StartWorkChanges = { [key: string]: any };
7575
function reducer(state: StartWorkState, action: StartWorkUIAction): StartWorkState {
7676
switch (action.type) {
7777
case StartWorkUIActionType.Init: {
78-
console.log(`JS-1324 start work controller init repo count: ${action.data.repoData.length}`);
78+
console.log(`JS-1324 start work controller init repo count: ${action.data.repoData?.length}`);
7979
const newstate = {
8080
...state,
8181
...action.data,

src/webview/singleViewFactory.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,17 @@ export class SingleWebview<FD, R> implements ReactWebview<FD> {
119119
const { id, site, product } = this._controller.screenDetails();
120120
this._analyticsApi.fireViewScreenEvent(id, site, product);
121121
} else {
122+
if (this._controller) {
123+
this._controller.update(factoryData);
124+
this._panel.title = this._controller.title();
125+
}
126+
122127
this._panel.webview.html = this._controllerFactory.webviewHtml(
123128
this._extensionPath,
124129
this._panel.webview.asWebviewUri(Uri.file(this._extensionPath)),
125130
this._panel.webview.cspSource,
126131
);
127132
this._panel.reveal(column ? column : ViewColumn.Active); // , false);
128-
if (this._controller) {
129-
this._controller.update(factoryData);
130-
}
131133
}
132134

133135
// Send feature gates to the panel in a message

0 commit comments

Comments
 (0)