Skip to content

Commit

Permalink
Fix thamara#232 - Automatically advance internal date on day change
Browse files Browse the repository at this point in the history
  • Loading branch information
tupaschoal committed Jun 19, 2020
1 parent 1bf9624 commit c79284a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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

0 comments on commit c79284a

Please sign in to comment.