mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* Don't invalidate allTags on scene update * Refetch AllTagsForFilter on scene update * Scene marker mutation should refetch scene * Fix value for marker tags
This commit is contained in:
parent
a3b60e95dd
commit
06fa88cc0a
2 changed files with 7 additions and 5 deletions
|
|
@ -173,7 +173,7 @@ export const SceneMarkersPanel: FunctionComponent<ISceneMarkersPanelProps> = (pr
|
||||||
<FilterMultiSelect
|
<FilterMultiSelect
|
||||||
type="tags"
|
type="tags"
|
||||||
onUpdate={(tags) => fieldProps.form.setFieldValue("tagIds", tags.map((tag) => tag.id))}
|
onUpdate={(tags) => fieldProps.form.setFieldValue("tagIds", tags.map((tag) => tag.id))}
|
||||||
initialIds={!!editingMarker ? editingMarker.tags.map((tag) => tag.id) : undefined}
|
initialIds={!!editingMarker ? fieldProps.form.values.tagIds : undefined}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -176,13 +176,13 @@ export class StashService {
|
||||||
];
|
];
|
||||||
|
|
||||||
public static useSceneMarkerCreate() {
|
public static useSceneMarkerCreate() {
|
||||||
return GQL.useSceneMarkerCreate();
|
return GQL.useSceneMarkerCreate({ refetchQueries: ["FindScene"] });
|
||||||
}
|
}
|
||||||
public static useSceneMarkerUpdate() {
|
public static useSceneMarkerUpdate() {
|
||||||
return GQL.useSceneMarkerUpdate();
|
return GQL.useSceneMarkerUpdate({ refetchQueries: ["FindScene"] });
|
||||||
}
|
}
|
||||||
public static useSceneMarkerDestroy() {
|
public static useSceneMarkerDestroy() {
|
||||||
return GQL.useSceneMarkerDestroy();
|
return GQL.useSceneMarkerDestroy({ refetchQueries: ["FindScene"] });
|
||||||
}
|
}
|
||||||
|
|
||||||
public static useScrapeFreeonesPerformers(q: string) { return GQL.useScrapeFreeonesPerformers({ variables: { q } }); }
|
public static useScrapeFreeonesPerformers(q: string) { return GQL.useScrapeFreeonesPerformers({ variables: { q } }); }
|
||||||
|
|
@ -232,12 +232,14 @@ export class StashService {
|
||||||
"findSceneMarkers",
|
"findSceneMarkers",
|
||||||
"findStudios",
|
"findStudios",
|
||||||
"allTags"
|
"allTags"
|
||||||
|
// TODO - add "findTags" when it is implemented
|
||||||
];
|
];
|
||||||
|
|
||||||
public static useSceneUpdate(input: GQL.SceneUpdateInput) {
|
public static useSceneUpdate(input: GQL.SceneUpdateInput) {
|
||||||
return GQL.useSceneUpdate({
|
return GQL.useSceneUpdate({
|
||||||
variables: input,
|
variables: input,
|
||||||
update: () => StashService.invalidateQueries(StashService.sceneMutationImpactedQueries)
|
update: () => StashService.invalidateQueries(StashService.sceneMutationImpactedQueries),
|
||||||
|
refetchQueries: ["AllTagsForFilter"]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue