Quellcode durchsuchen

Ensures settings webview state is not stale

main
Eric Amodio vor 1 Jahr
Ursprung
Commit
912289d73f
3 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. +2
    -0
      src/webviews/apps/settings/settings.ts
  2. +4
    -0
      src/webviews/settings/settingsWebview.ts
  3. +1
    -0
      src/webviews/webviewController.ts

+ 2
- 0
src/webviews/apps/settings/settings.ts Datei anzeigen

@ -149,6 +149,8 @@ export class SettingsApp extends App {
onIpc(DidChangeConfigurationNotificationType, msg, params => {
this.state.config = params.config;
this.state.customSettings = params.customSettings;
this.state.timestamp = Date.now();
this.setState(this.state);
this.updateState();
});

+ 4
- 0
src/webviews/settings/settingsWebview.ts Datei anzeigen

@ -54,6 +54,10 @@ export class SettingsWebviewProvider implements WebviewProvider {
};
}
onReloaded(): void {
void this.notifyDidChangeConfiguration();
}
onShowing?(
loading: boolean,
_options: { column?: ViewColumn; preserveFocus?: boolean },

+ 1
- 0
src/webviews/webviewController.ts Datei anzeigen

@ -375,6 +375,7 @@ export class WebviewController<
if (this._ready) {
this.sendPendingIpcNotifications();
} else if (this.provider.onReloaded != null) {
this.clearPendingIpcNotifications();
this.provider.onReloaded();
} else {
void this.refresh();

Laden…
Abbrechen
Speichern