Quellcode durchsuchen

Ensures Commit Details updates on visible toggle

main
Eric Amodio vor 1 Jahr
Ursprung
Commit
9fdb50644b
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. +5
    -0
      src/webviews/commitDetails/commitDetailsWebview.ts

+ 5
- 0
src/webviews/commitDetails/commitDetailsWebview.ts Datei anzeigen

@ -81,6 +81,8 @@ interface Context {
count: number;
position: number;
};
visible: boolean;
}
export class CommitDetailsWebviewProvider implements WebviewProvider<State, Serialized<State>> {
@ -120,6 +122,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
count: 0,
position: 0,
},
visible: false,
};
this._disposable = configuration.onDidChangeAny(this.onAnyConfigurationChanged, this);
@ -188,6 +191,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
onVisibilityChanged(visible: boolean) {
this.ensureTrackers();
this.updatePendingContext({ visible: visible });
if (!visible) return;
// Since this gets called even the first time the webview is shown, avoid sending an update, because the bootstrap has the data
@ -197,6 +201,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
if (this._pendingContext == null) return;
}
this.onRefresh();
this.updateState(true);
}

Laden…
Abbrechen
Speichern