Skip to content

Commit ee42ec2

Browse files
Adds refresh to account section
1 parent a84f995 commit ee42ec2

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8091,6 +8091,12 @@
80918091
"category": "GitLens",
80928092
"icon": "$(refresh)"
80938093
},
8094+
{
8095+
"command": "gitlens.views.home.account.refresh",
8096+
"title": "Refresh",
8097+
"category": "GitLens",
8098+
"icon": "$(refresh)"
8099+
},
80948100
{
80958101
"command": "gitlens.views.launchpad.copy",
80968102
"title": "Copy",
@@ -11482,6 +11488,10 @@
1148211488
"command": "gitlens.views.home.refresh",
1148311489
"when": "false"
1148411490
},
11491+
{
11492+
"command": "gitlens.views.home.account.refresh",
11493+
"when": "false"
11494+
},
1148511495
{
1148611496
"command": "gitlens.views.launchpad.copy",
1148711497
"when": "false"

src/webviews/apps/plus/shared/components/home-account-content.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ export class GLHomeAccountContent extends LitElement {
219219
this.hasAccount,
220220
() => html`
221221
<span class="header__actions">
222+
<gl-button
223+
appearance="toolbar"
224+
href="command:gitlens.views.home.account.refresh"
225+
tooltip="Refresh"
226+
aria-label="Refresh"
227+
><code-icon icon="refresh"></code-icon
228+
></gl-button>
222229
<gl-button
223230
appearance="toolbar"
224231
href="command:gitlens.plus.logout"

src/webviews/home/homeWebview.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
7575
}
7676

7777
registerCommands(): Disposable[] {
78-
return [registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this)];
78+
return [
79+
registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this),
80+
registerCommand(
81+
`${this.host.id}.account.refresh`,
82+
() => this.container.subscription.validate({ force: true }),
83+
this,
84+
),
85+
];
7986
}
8087

8188
onMessageReceived(e: IpcMessage) {

0 commit comments

Comments
 (0)