Browse Source

Fix regression introduced by #712, resolves #728 (#750)

Lennart Grahl 6 years ago
parent
commit
2723fb2ae0
2 changed files with 8 additions and 4 deletions
  1. 3 1
      src/partials/messenger.ts
  2. 5 3
      src/services/webclient.ts

+ 3 - 1
src/partials/messenger.ts

@@ -473,7 +473,9 @@ class ConversationController {
             return this.receiver.locked;
         }, () => {
             if (this.locked !== this.receiver.locked) {
-                $state.reload();
+                $state.reload().catch((error) => {
+                    this.$log.error('Unable to reload state:', error);
+                });
             }
         });
     }

+ 5 - 3
src/services/webclient.ts

@@ -897,9 +897,11 @@ export class WebClientService {
                 this._resetInitializationSteps();
 
                 // Hack for #712
-                // TODO: Remove once we have the ack protocol for Android too
-                if (this.$state.includes('messenger')) {
-                    this.$state.reload();
+                // TODO: Remove once we have the ack protocol for Android, too
+                if (this.chosenTask !== threema.ChosenTask.RelayedData && this.$state.includes('messenger')) {
+                    this.$state.reload().catch((error) => {
+                        this.$log.error('Unable to reload state:', error);
+                    });
                 }
             });
         }