thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
463 stars 271 forks source link

Fix #925: Punch from tray and reload after changing database do not work #926

Closed tupaschoal closed 1 year ago

tupaschoal commented 1 year ago

Related issue

Closes #925

Context / Background

The remaining actions that used executeJavaScript were broken once calendar.js became a module, and thus all of the actions associated to it were broken. This was the reason for the broken promise warnings on the terminal

What change is being introduced by this PR?

This changes the actions to send messages to the listeners on ipcRenderer instead, which works just fine. There is a consequence that this becomes asynchronous and "uncheckable", which was not true previously, as the executeJavaScript returns a promise, which wasn't being used anyway.

How will this be tested?

I did some manual testing and it works. No idea how to write tests for these yet.

codecov[bot] commented 1 year ago

Codecov Report

Merging #926 (6b88d82) into main (8b93f27) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #926   +/-   ##
=======================================
  Coverage   73.56%   73.56%           
=======================================
  Files          17       17           
  Lines        1755     1755           
  Branches      278      278           
=======================================
  Hits         1291     1291           
  Misses        464      464           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

tupaschoal commented 1 year ago

\changelog-update Message: Fix [#925]: Punch from tray and reload after changing database do not work (#926)