diff --git a/package.json b/package.json index c1b634d..8020f13 100644 --- a/package.json +++ b/package.json @@ -10278,7 +10278,7 @@ }, { "command": "gitlens.focus.refresh", - "when": "gitlens:focus:focused", + "when": "gitlens:webview:focus:active", "group": "navigation@-98" } ], diff --git a/src/constants.ts b/src/constants.ts index 97d86df..312c81c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -520,7 +520,6 @@ export type ContextKeys = | `${typeof extensionPrefix}:disabledToggleCodeLens` | `${typeof extensionPrefix}:disabled` | `${typeof extensionPrefix}:enabled` - | `${typeof extensionPrefix}:focus:focused` // TODO@eamodio do we need this | `${typeof extensionPrefix}:hasConnectedRemotes` | `${typeof extensionPrefix}:hasRemotes` | `${typeof extensionPrefix}:hasRichRemotes` diff --git a/src/plus/webviews/focus/focusWebview.ts b/src/plus/webviews/focus/focusWebview.ts index 5f4bb79..727326a 100644 --- a/src/plus/webviews/focus/focusWebview.ts +++ b/src/plus/webviews/focus/focusWebview.ts @@ -74,17 +74,6 @@ export class FocusWebviewProvider implements WebviewProvider { return [registerCommand(Commands.RefreshFocus, () => this.host.refresh(true))]; } - onFocusChanged(focused: boolean): void { - if (focused) { - // If we are becoming focused, delay it a bit to give the UI time to update - setTimeout(() => void setContext('gitlens:focus:focused', focused), 0); - - return; - } - - void setContext('gitlens:focus:focused', focused); - } - onMessageReceived(e: IpcMessage) { switch (e.method) { case SwitchToBranchCommandType.method: