From 748a4f7a60b0ad54f2bf10435b5b6f74721328b7 Mon Sep 17 00:00:00 2001 From: Fayeed Date: Mon, 1 May 2023 13:05:01 +0530 Subject: [PATCH 1/2] Fixed Perspective handle's state was not updated when the instance state got updated which caused the issue --- executor/src/core/PerspectivesController.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/executor/src/core/PerspectivesController.ts b/executor/src/core/PerspectivesController.ts index c9ef67a8f..5ceefaedd 100644 --- a/executor/src/core/PerspectivesController.ts +++ b/executor/src/core/PerspectivesController.ts @@ -79,8 +79,10 @@ export default class PerspectivesController { this.#context.languageController!.addSyncStateChangeObserver(async (state: PerspectiveState, lang: LanguageRef) => { let perspective = Array.from(this.#perspectiveInstances.values()).find((perspective: Perspective) => perspective.neighbourhood?.linkLanguage === lang.address); + let perspectiveHandle = Array.from(this.#perspectiveHandles.values()).find((p) => p.uuid === perspective?.uuid); if (perspective) { await perspective.updatePerspectiveState(state); + perspectiveHandle!.state = state; } else { console.warn(`Could not find perspective sync state change signal with lang: ${lang}`) } From 69ac91b36c30eae88c3d8d3a366b24f9afa0c852 Mon Sep 17 00:00:00 2001 From: Fayeed Date: Mon, 1 May 2023 13:06:04 +0530 Subject: [PATCH 2/2] Changelog updated --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index af135f362..0135d6af3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ This project _loosely_ adheres to [Semantic Versioning](https://semver.org/spec/ ### Fixed - Expression -> get would fail when executed on a Literal expression. [PR#353](https://github.com/perspect3vism/ad4m/pull/353) - Fixed launcher breaking on windows if a new app instance is created. [PR#362](https://github.com/perspect3vism/ad4m/pull/362) + - Fixed Perspective handle's state was not updated when the instance state got updated which caused the issue. [PR#368](https://github.com/perspect3vism/ad4m/pull/368) ## [0.3.4] - 27/03/2023 ### Added