Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
c21cca3c57
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  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');