aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/GroupManager.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-09 01:47:59 -0400
committerbobzel <zzzman@gmail.com>2020-10-09 01:47:59 -0400
commitd4e967ed8fc2f99d44b887ebabf0a4eb642ecaab (patch)
tree279f99766f6f29ea7552c06cf3c84c4e13388506 /src/client/util/GroupManager.tsx
parent565ab27220e2e626b88642929a4091d3ced893e7 (diff)
simplified setting group users
Diffstat (limited to 'src/client/util/GroupManager.tsx')
-rw-r--r--src/client/util/GroupManager.tsx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/client/util/GroupManager.tsx b/src/client/util/GroupManager.tsx
index fb3342e68..48e3ca737 100644
--- a/src/client/util/GroupManager.tsx
+++ b/src/client/util/GroupManager.tsx
@@ -59,17 +59,9 @@ export class GroupManager extends React.Component<{}> {
*/
populateUsers = async () => {
if (!this.populating) {
- this.populating = true;
- runInAction(() => this.users = []);
const userList = await RequestPromise.get(Utils.prepend("/getUsers"));
const raw = JSON.parse(userList) as User[];
- const evaluating = raw.map(async user => {
- const userSharingDocument = await DocServer.GetRefField(user.sharingDocumentId);
- if (userSharingDocument instanceof Doc) {
- runInAction(() => this.users.push(user.email));
- }
- });
- return Promise.all(evaluating).then(() => this.populating = false);
+ raw.map(action(user => !this.users.some(umail => umail === user.email) && this.users.push(user.email)));
}
}