From 4d5a0d3b70139f85d161abe08167f8745e725f5b Mon Sep 17 00:00:00 2001 From: Dan Gershony Date: Fri, 20 Dec 2024 15:50:50 +0000 Subject: [PATCH] Fix how we handle fetching a project on the view page (#229) --- src/Angor/Client/Pages/View.razor | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Angor/Client/Pages/View.razor b/src/Angor/Client/Pages/View.razor index a61c9780..91be89e3 100644 --- a/src/Angor/Client/Pages/View.razor +++ b/src/Angor/Client/Pages/View.razor @@ -521,11 +521,14 @@ else { project = new Project { CreationTransactionId = projectIndexerData.TrxId }; - _RelayService.LookupProjectsInfoByEventIds(x => + _RelayService.LookupProjectsInfoByEventIds(projectInfo => { - if (project is { ProjectInfo : null }) - project.ProjectInfo = serializer.Deserialize(x.Content!) ?? - throw new Exception("The project info must be in the application specific data event"); + if (projectInfo is null) + { + throw new Exception("The project info must be in the application specific data event"); + } + + if (project is { ProjectInfo : null }) { project.ProjectInfo = projectInfo; } }, () => { @@ -539,7 +542,10 @@ else findInProgress = false; if (project?.ProjectInfo != null) { - SessionStorage.StoreProject(project); + if (!SessionStorage.IsProjectInStorageById(project.ProjectInfo.ProjectIdentifier)) + { + SessionStorage.StoreProject(project); + } } else {