Browse Source

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 năm trước cách đây
mục cha
commit
c21cca3c57
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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');