Sfoglia il codice sorgente

Fix states after a resumed session has been stopped or deleted
Fix states after a redirect to 'welcome'

Lennart Grahl 7 anni fa
parent
commit
fec0823573
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 0
      src/partials/welcome.ts
  2. 0 1
      src/services/webclient.ts

+ 3 - 0
src/partials/welcome.ts

@@ -258,6 +258,7 @@ class WelcomeController {
             reason: DisconnectReason.SessionStopped,
             send: false,
             close: 'welcome',
+            connectionBuildupState: this.stateService.connectionBuildupState,
         });
         this.webClientService.init({
             resume: false,
@@ -280,6 +281,7 @@ class WelcomeController {
      * Initiate a new session by unlocking a trusted key.
      */
     private unlock(): void {
+        this.stateService.reset('new');
         this.$log.info(this.logTag, 'Initialize session by unlocking trusted key...');
     }
 
@@ -383,6 +385,7 @@ class WelcomeController {
             reason: DisconnectReason.SessionStopped,
             send: false,
             close: 'welcome',
+            connectionBuildupState: this.stateService.connectionBuildupState,
         });
 
         // Initialize push service

+ 0 - 1
src/services/webclient.ts

@@ -2194,7 +2194,6 @@ export class WebClientService {
             send: false,
             // TODO: Use welcome.{reason} once we have it
             close: 'welcome',
-            connectionBuildupState: 'closed',
         });
         this.showAlert(alertMessage);
     }