Listen to Sessions events too

Re-added the <Session> watcher, so we can see file add/remove/modify events, not just commits and branch changes. We actually need to watch both.
This commit is contained in:
Scott Chacon 2023-03-22 14:29:43 +01:00
parent c6b23dc250
commit 501983f9bb

View File

@ -36,5 +36,12 @@ export default async (params: { projectId: string }) => {
store.set(statuses);
});
appWindow.listen<Session>(`project://${params.projectId}/sessions`, async (event) => {
log.info(`Status: Received sessions event, projectId: ${params.projectId}`);
const statusesGit = await listFiles(params);
const statuses = convertToStatuses(statusesGit);
store.set(statuses);
});
return store as Readable<Status[]>;
};