Skip to content

Commit

Permalink
don't send analysis-complete in parseMessage, send it in updateFilesB…
Browse files Browse the repository at this point in the history
…eingProcessed
  • Loading branch information
Mattk70 committed Mar 22, 2024
1 parent 21a97f2 commit 66de0de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -3623,7 +3623,9 @@ function onChartData(args) {
DOM.resultHeader.classList.remove('text-bg-secondary');
DOM.resultHeader.classList.add('text-bg-dark');
// Add a hover to summary to indicate activation
document.getElementById('resultSummary').classList.add('table-hover');
const summary = document.getElementById('resultSummary');
// If there were no results, there'll be no summary
summary?.classList.add('table-hover');
}

const setSortOrder = (order) => {
Expand Down
6 changes: 3 additions & 3 deletions js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@ async function parseMessage(e) {
if (filesBeingProcessed.length) {
processNextFile({ worker: worker });
} else if ( !STATE.selection) {
getSummary().then(() => UI.postMessage({event: "analysis-complete"}));
getSummary() //.then(() => UI.postMessage({event: "analysis-complete"}));
} else {
UI.postMessage({event: "analysis-complete"});
}
Expand All @@ -2101,7 +2101,7 @@ function updateFilesBeingProcessed(file) {
if (!filesBeingProcessed.length) {
if (!STATE.selection) getSummary();
// Need this here in case last file is not sent for analysis (e.g. nocmig mode)
UI.postMessage({event: 'processing-complete'})
UI.postMessage({event: 'analysis-complete'})
}
}

Expand All @@ -2124,7 +2124,7 @@ async function processNextFile({
// Nothing to do for this file

updateFilesBeingProcessed(file);
const result = `No detections. ${file} has no period within it where predictions would be given. <b>Tip:</b> To see detections in this file, disable nocmig mode.`;
const result = `No detections. ${file} has no period within it where predictions would be given. <b>Tip:</b> To see detections in this file, disable nocmig mode and run the analysis again.`;

UI.postMessage({
event: 'new-result', file: file, result: result, index: index
Expand Down

0 comments on commit 66de0de

Please sign in to comment.