From 2ae97b6d0eaaa1929bf579b710d69db5a92f21b0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 23 Aug 2021 10:26:07 +0200 Subject: [PATCH] Forced collapse of user Profiles --- .../UI/Spaces/User-Profile-Space/UserProfile.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 5d081dde6..1ca667ce0 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -37,9 +37,17 @@ function newGovernanceUserProfileSpace() { /* If the workspace is not related to governance, then we exit the Intialize Function */ - let resultsArary = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') - if (resultsArary.length === 0) { return } - + let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') + if (userProfiles.length === 0) { return } + /* + We are going to collapse all User Profiles to save processing resources at the UI + */ + for (let i = 0; i < userProfiles.length; i++) { + userProfile = userProfiles[i] + if (userProfile.payload.floatingObject.isCollapsed !== true) { + userProfile.payload.floatingObject.collapseToggle() + } + } /* Here we will setup the Reputation for each profile. */