mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Studio select refactor (#4493)
* Add id interface to findStudios * Replace existing selects * Remove unused code * Fix scrape/merge select * Make clearable
This commit is contained in:
@@ -319,7 +319,22 @@ export const queryFindStudios = (filter: ListFilterModel) =>
|
||||
},
|
||||
});
|
||||
|
||||
export const useAllStudiosForFilter = () => GQL.useAllStudiosForFilterQuery();
|
||||
export const queryFindStudiosByIDForSelect = (studioIDs: number[]) =>
|
||||
client.query<GQL.FindStudiosForSelectQuery>({
|
||||
query: GQL.FindStudiosForSelectDocument,
|
||||
variables: {
|
||||
ids: studioIDs,
|
||||
},
|
||||
});
|
||||
|
||||
export const queryFindStudiosForSelect = (filter: ListFilterModel) =>
|
||||
client.query<GQL.FindStudiosForSelectQuery>({
|
||||
query: GQL.FindStudiosForSelectDocument,
|
||||
variables: {
|
||||
filter: filter.makeFindFilter(),
|
||||
studio_filter: filter.makeFilter(),
|
||||
},
|
||||
});
|
||||
|
||||
export const useFindTag = (id: string) => {
|
||||
const skip = id === "new" || id === "";
|
||||
@@ -1519,8 +1534,6 @@ export const useStudioCreate = () =>
|
||||
const studio = result.data?.studioCreate;
|
||||
if (!studio || !variables) return;
|
||||
|
||||
appendObject(cache, studio, GQL.AllStudiosForFilterDocument);
|
||||
|
||||
// update stats
|
||||
updateStats(cache, "studio_count", 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user