Skip to content

Commit eec836a

Browse files
committed
do not list those that were already listed
1 parent 8873b2a commit eec836a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", {
141141

142142
__collaboratorButton: function(collaborator) {
143143
const collaboratorButton = new osparc.filter.CollaboratorToggleButton(collaborator);
144+
collaboratorButton.groupId = collaborator.getGroupId();
144145
collaboratorButton.addListener("changeValue", e => {
145146
const selected = e.getData();
146147
if (selected) {
@@ -190,10 +191,14 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", {
190191

191192
const existingCollaborators = existingCollabs.map(c => parseInt(c));
192193
potentialCollaborators.forEach(potentialCollaborator => {
193-
// do not list the visibleCollaborators that are already collaborators
194+
// do not list the potentialCollaborators that are already collaborators
194195
if (existingCollaborators.includes(potentialCollaborator.getGroupId())) {
195196
return;
196197
}
198+
// do not list those that were already listed
199+
if (this.__collabButtonsContainer.getChildren().find(c => "groupId" in c && c["groupId"] === potentialCollaborator.getGroupId())) {
200+
return;
201+
}
197202
if (this.__showOrganizations === false && potentialCollaborator["collabType"] !== 2) {
198203
return;
199204
}

0 commit comments

Comments
 (0)