Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #232 - Automatically advance internal date on day change #269

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Fix: [#27] Adding day balance on when to leave bar after day is done
- Fix: [#210] Count today preference is respected
- Fix: [#211] Adjusted preferences window size to fit the whole content
- Fix: [#232] Calendar not advancing to next day when system clock does
- Fix: [#233] Fixes crash when opening the waiver for a day
- Fix: [#229] Count Today in totals no longer causes problem in the month balance
- Fix: [#239] Punch button is disabled when current day is waived
Expand Down
4 changes: 4 additions & 0 deletions js/classes/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ class Calendar {
this._draw();
}

goToCurrentDate() {
this._goToCurrentDate();
}

/*
* Display next month.
*/
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function refreshOnDayChange() {
{
launchDate = today;
// Reload only the calendar itself to avoid a flash
win.webContents.executeJavaScript('calendar.redraw()');
win.webContents.executeJavaScript('calendar.goToCurrentDate()');
}
}

Expand Down