浏览代码

Avoids resetting state unless forced refresh

Ensures an update if subscription changed while hidden
main
Eric Amodio 1年前
父节点
当前提交
9d058564d3
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. +6
    -2
      src/plus/webviews/graph/graphWebview.ts

+ 6
- 2
src/plus/webviews/graph/graphWebview.ts 查看文件

@ -289,8 +289,8 @@ export class GraphWebviewProvider implements WebviewProvider {
}
onRefresh(force?: boolean) {
this.resetRepositoryState();
if (force) {
this.resetRepositoryState();
this._pendingIpcNotifications.clear();
}
}
@ -400,7 +400,11 @@ export class GraphWebviewProvider implements WebviewProvider {
this._showActiveSelectionDetailsDebounced?.cancel();
}
if (visible && this.repository != null && this.repository.etag !== this._etagRepository) {
if (
visible &&
((this.repository != null && this.repository.etag !== this._etagRepository) ||
this.container.subscription.etag !== this._etagSubscription)
) {
this.updateState(true);
return;
}

正在加载...
取消
保存