Skip to content

Commit

Permalink
Fix bug that caused some events to be missed
Browse files Browse the repository at this point in the history
  • Loading branch information
brafdlog committed Nov 9, 2024
1 parent 712c4ee commit 130d4f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export const registerHandlers = () => {
ipcMain.on('scrape', async (event: IpcMainEvent) => {
const config = await getConfig();
const eventSubscriber = new BudgetTrackingEventEmitter();
scrapeAndUpdateOutputVendors(config, eventSubscriber);
setPeriodicScrapingIfNeeded(config, eventSubscriber);
eventSubscriber.onAny((eventName, eventData) => {
event.reply('scrapingProgress', JSON.stringify({ eventName, eventData }));
});
await setPeriodicScrapingIfNeeded(config, eventSubscriber);
await scrapeAndUpdateOutputVendors(config, eventSubscriber);
});

ipcMain.removeAllListeners('getYnabAccountData');
Expand Down

0 comments on commit 130d4f2

Please sign in to comment.