mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-29 20:43:37 +03:00
Scope the list files api call for better performance
This commit is contained in:
parent
fa24122307
commit
466277a04e
@ -21,7 +21,7 @@ export type Session = {
|
|||||||
activity: Activity[];
|
activity: Activity[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const listFiles = (params: { projectId: string; sessionId: string }) =>
|
export const listFiles = (params: { projectId: string; sessionId: string; paths?: string[] }) =>
|
||||||
invoke<Record<string, string>>('list_session_files', params);
|
invoke<Record<string, string>>('list_session_files', params);
|
||||||
|
|
||||||
const list = (params: { projectId: string }) => invoke<Session[]>('list_sessions', params);
|
const list = (params: { projectId: string }) => invoke<Session[]>('list_sessions', params);
|
||||||
|
@ -226,7 +226,8 @@
|
|||||||
deltas: uiSession.deltas,
|
deltas: uiSession.deltas,
|
||||||
files: listFiles({
|
files: listFiles({
|
||||||
projectId: $project?.id,
|
projectId: $project?.id,
|
||||||
sessionId: uiSession.session.id
|
sessionId: uiSession.session.id,
|
||||||
|
paths: Object.keys(uiSession.deltas)
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
scrollExpandedIntoView(dateMilliseconds);
|
scrollExpandedIntoView(dateMilliseconds);
|
||||||
|
Loading…
Reference in New Issue
Block a user