|
|
@ -23,7 +23,19 @@ export class AccountWebviewProvider implements WebviewProvider { |
|
|
|
} |
|
|
|
|
|
|
|
private onSubscriptionChanged(e: SubscriptionChangeEvent) { |
|
|
|
void this.notifyDidChangeData(e.current); |
|
|
|
void this.notifyDidChangeSubscription(e.current); |
|
|
|
} |
|
|
|
|
|
|
|
registerCommands(): Disposable[] { |
|
|
|
return [registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this)]; |
|
|
|
} |
|
|
|
|
|
|
|
includeBootstrap(): Promise<State> { |
|
|
|
return this.getState(); |
|
|
|
} |
|
|
|
|
|
|
|
onReloaded(): void { |
|
|
|
void this.notifyDidChangeSubscription(); |
|
|
|
} |
|
|
|
|
|
|
|
onVisibilityChanged(visible: boolean): void { |
|
|
@ -44,14 +56,6 @@ export class AccountWebviewProvider implements WebviewProvider { |
|
|
|
queueMicrotask(() => void this.validateSubscription()); |
|
|
|
} |
|
|
|
|
|
|
|
registerCommands(): Disposable[] { |
|
|
|
return [registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this)]; |
|
|
|
} |
|
|
|
|
|
|
|
includeBootstrap(): Promise<State> { |
|
|
|
return this.getState(); |
|
|
|
} |
|
|
|
|
|
|
|
private async getRepoVisibility(): Promise<RepositoriesVisibility> { |
|
|
|
const visibility = await this.container.git.visibility(); |
|
|
|
return visibility; |
|
|
@ -84,9 +88,7 @@ export class AccountWebviewProvider implements WebviewProvider { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
private notifyDidChangeData(subscription?: Subscription) { |
|
|
|
if (!this.host.ready) return false; |
|
|
|
|
|
|
|
private notifyDidChangeSubscription(subscription?: Subscription) { |
|
|
|
return window.withProgress({ location: { viewId: this.host.id } }, async () => { |
|
|
|
const sub = await this.getSubscription(subscription); |
|
|
|
return this.host.notify(DidChangeSubscriptionNotificationType, { |
|
|
|