mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
fixes #82229
This commit is contained in:
parent
06d1b4ad41
commit
aa28cc6e36
|
@ -444,9 +444,9 @@ export class CustomMenubarControl extends MenubarControl {
|
|||
return null;
|
||||
|
||||
case StateType.Idle:
|
||||
const windowId = this.electronEnvironmentService.windowId;
|
||||
const context = `window:${this.electronEnvironmentService ? this.electronEnvironmentService.windowId : 'any'}`;
|
||||
return new Action('update.check', nls.localize({ key: 'checkForUpdates', comment: ['&& denotes a mnemonic'] }, "Check for &&Updates..."), undefined, true, () =>
|
||||
this.updateService.checkForUpdates({ windowId }));
|
||||
this.updateService.checkForUpdates(context));
|
||||
|
||||
case StateType.CheckingForUpdates:
|
||||
return new Action('update.checking', nls.localize('checkingForUpdates', "Checking for Updates..."), undefined, false);
|
||||
|
|
|
@ -171,7 +171,7 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
|
|||
private readonly badgeDisposable = this._register(new MutableDisposable());
|
||||
private updateStateContextKey: IContextKey<string>;
|
||||
|
||||
private windowId: number | undefined = this.electronEnvironmentService ? this.electronEnvironmentService.windowId : undefined;
|
||||
private context = `window:${this.electronEnvironmentService ? this.electronEnvironmentService.windowId : 'any'}`;
|
||||
|
||||
constructor(
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
|
@ -218,7 +218,7 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
|
|||
case StateType.Idle:
|
||||
if (state.error) {
|
||||
this.onError(state.error);
|
||||
} else if (this.state.type === StateType.CheckingForUpdates && this.state.context && this.state.context.windowId === this.windowId) {
|
||||
} else if (this.state.type === StateType.CheckingForUpdates && this.state.context === this.context) {
|
||||
this.onUpdateNotAvailable();
|
||||
}
|
||||
break;
|
||||
|
@ -401,7 +401,7 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
|
|||
}
|
||||
|
||||
private registerGlobalActivityActions(): void {
|
||||
CommandsRegistry.registerCommand('update.check', () => this.updateService.checkForUpdates({ windowId: this.windowId }));
|
||||
CommandsRegistry.registerCommand('update.check', () => this.updateService.checkForUpdates(this.context));
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
group: '6_update',
|
||||
command: {
|
||||
|
|
Loading…
Reference in a new issue