Sfoglia il codice sorgente

Add delay to version check on connect

The reason for this is that the messenger constructor closes all
potentially open dialogs. We want to avoid having our dialog closed too.

7 seconds should be plenty of time for the initial data to be loaded.
Danilo Bargen 8 anni fa
parent
commit
c21cca3c57
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/services/webclient.ts

+ 3 - 1
src/services/webclient.ts

@@ -451,7 +451,9 @@ export class WebClientService {
                     this._requestInitialData();
 
                     // Fetch current version
-                    this.versionService.checkForUpdate();
+                    // Delay it to prevent the dialog from being closed by the messenger constructor,
+                    // which closes all open dialogs.
+                    this.$timeout(() => this.versionService.checkForUpdate(), 7000);
 
                     // Notify state service about data loading
                     this.stateService.updateConnectionBuildupState('loading');