fix: invitations list is now updated when the actor changes

This commit is contained in:
Massedil
2025-11-05 13:38:17 +01:00
committed by setop
parent 300bc6ec92
commit bbeb8d5fae

View File

@@ -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
// -------------------------------------------------------------