fix: invitations list is now updated when the actor changes
This commit is contained in:
@@ -139,9 +139,10 @@ import { usernameWithDomain, displayName, IGroup } from "@/types/actor";
|
||||
import { useHead } from "@/utils/head";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useMutation, useQuery } from "@vue/apollo-composable";
|
||||
import { computed, ref } from "vue";
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { useGroup } from "@/composition/apollo/group";
|
||||
import { IInvitation } from "@/types/actor/invitation.model";
|
||||
import { useCurrentActorClient } from "@/composition/apollo/actor";
|
||||
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
@@ -174,6 +175,13 @@ const {
|
||||
})
|
||||
);
|
||||
|
||||
// We need to refetch when the actor is changed
|
||||
const { currentActor } = useCurrentActorClient();
|
||||
|
||||
watch(currentActor, () => {
|
||||
groupInvitationsRefetch();
|
||||
});
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Create invitation
|
||||
// -------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user