Skip to content

Commit

Permalink
- Ensure countdown values never go below zero in the modal logic for …
Browse files Browse the repository at this point in the history
…API request timeouts.

- Update visit classifications to skip "false-trigger" and reclassify "none" as "unidentified" to simplify activity digest emails.
  • Loading branch information
hardiesoft committed Feb 11, 2025
1 parent 9712500 commit 029f8cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions api/scripts/project-activity-digest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ const allVisitsForProjectInTimespan = async (
}
if (!alreadySentNoActivityEmail) {
for (const visit of visits) {
if (visit.classification === "false-trigger") {
continue;
}
if (visit.classification === "none") {
visit.classification = "unidentified";
}
recordingData[visit.classification] =
recordingData[visit.classification] || 0;
recordingData[visit.classification] += 1;
Expand Down
4 changes: 2 additions & 2 deletions browse-next/src/components/NetworkConnectionAlertModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ watch(
if (networkConnectionError.retryCount === MAX_RETRY_COUNT) {
show.value = false;
} else {
countDown.value = count / 1000;
countDown.value = Math.max(0, count / 1000);
countDownInterval.value = setInterval(() => {
countDown.value--;
countDown.value = Math.max(0, countDown.value - 1);
}, 1000) as unknown as number;
}
},
Expand Down

0 comments on commit 029f8cf

Please sign in to comment.