mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-28 20:15:20 +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[];
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
const list = (params: { projectId: string }) => invoke<Session[]>('list_sessions', params);
|
||||
|
@ -226,7 +226,8 @@
|
||||
deltas: uiSession.deltas,
|
||||
files: listFiles({
|
||||
projectId: $project?.id,
|
||||
sessionId: uiSession.session.id
|
||||
sessionId: uiSession.session.id,
|
||||
paths: Object.keys(uiSession.deltas)
|
||||
})
|
||||
};
|
||||
scrollExpandedIntoView(dateMilliseconds);
|
||||
|
Loading…
Reference in New Issue
Block a user