瀏覽代碼

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 年之前
父節點
當前提交
c21cca3c57
共有 1 個文件被更改,包括 3 次插入1 次删除
  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');