Skip to content

Commit

Permalink
Merge branch 'main' into ID-3129
Browse files Browse the repository at this point in the history
  • Loading branch information
imx-mikhala authored Dec 19, 2024
2 parents 514f3df + 8ea903d commit 319cfd7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ const syncSendCount = () => {
sendCount = getItem(SESSION_ACTIVITY_COUNT_KEY) || {};
const sendDay = getItem(SESSION_ACTIVITY_DAY_KEY);

// If no day, set count to zero. If not today, reset sendCount to 0
const today = new Date().toISOString().split('T')[0];
// If no day, init sendCount. If not today, reset sendCount
const date = new Date();
const yyyy = date.getFullYear();
const mm = `${date.getMonth() + 1}`.padStart(2, '0');
const dd = `${date.getDate()}`.padStart(2, '0');
const today = `${yyyy}-${mm}-${dd}`;
if (!sendDay || sendDay !== today) {
sendCount = {};
}
Expand Down

0 comments on commit 319cfd7

Please sign in to comment.