From 3519cec34fb003780dac84a440e00045161b2a78 Mon Sep 17 00:00:00 2001 From: Fulmine Date: Sun, 20 Mar 2022 07:53:56 +0100 Subject: [PATCH] fix editing group members from group page --- src/lib/group/Body.svelte | 2 +- src/lib/group/List.svelte | 4 ++-- src/lib/group/MemberEdit.svelte | 2 +- src/pages/Group.svelte | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/group/Body.svelte b/src/lib/group/Body.svelte index 3bf4b2a5..ef1792fb 100644 --- a/src/lib/group/Body.svelte +++ b/src/lib/group/Body.svelte @@ -117,6 +117,6 @@ {:else if editMode} {:else if memberMode} - + {/if} \ No newline at end of file diff --git a/src/lib/group/List.svelte b/src/lib/group/List.svelte index d39d240d..d68533d0 100644 --- a/src/lib/group/List.svelte +++ b/src/lib/group/List.svelte @@ -294,14 +294,14 @@ - + {:else} - + {/if} {/each} diff --git a/src/lib/group/MemberEdit.svelte b/src/lib/group/MemberEdit.svelte index 5354bccb..95b31533 100644 --- a/src/lib/group/MemberEdit.svelte +++ b/src/lib/group/MemberEdit.svelte @@ -65,7 +65,7 @@ function memberListRenderer(item: any) { const dispatch = createEventDispatcher(); function update() { - dispatch("update", group) + dispatch("updateMembers", group) } async function submitAdd() { diff --git a/src/pages/Group.svelte b/src/pages/Group.svelte index f7427ba6..81a6d708 100644 --- a/src/pages/Group.svelte +++ b/src/pages/Group.svelte @@ -65,6 +65,7 @@ async function fetchMembers() { try { members = await api().groups($params.id).members().get({auth: !isPublic}); + group.members = members.map(function(member) {return member.uuid}); if (!isPublic) { await new Promise(resolve => setTimeout(resolve, 1000)); systemMembers = await api().systems("@me").members.get({ auth: true }); @@ -134,7 +135,7 @@ - + {/if}