Skip to content

Commit

Permalink
update unprocessed inputs after recording user input
Browse files Browse the repository at this point in the history
-- Part of the fix for e-mission/e-mission-docs#1034

When a user input is recorded, we put it in storage. For snappy performance we also cache it in the timelineLabelMap / timelineNotesMap state.
However, if we switch filters or load more trips, this state gets overridden. So, we need to call updateLocalUnprocessedInputs at some point.
It is an async function but we can call it without 'await' and just allow it to execute in the background.
  • Loading branch information
JGreenlee committed Jan 8, 2024
1 parent 80e3903 commit 961ac78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions www/js/diary/LabelTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ const LabelTab = () => {
};
setTimelineNotesMap(newTimelineNotesMap);
}
/* we can update unprocessed inputs in the background, without blocking the UI,
so this is not 'await'ed */
updateLocalUnprocessedInputs(pipelineRange, appConfig);
}

const contextVals = {
Expand Down

0 comments on commit 961ac78

Please sign in to comment.