jerrod-lankford / google-voice-desktop-app

An electron shell wrapper around the google voice website
246 stars 37 forks source link

Fix white screen bug / Remove window flicker when starting hidden / Add "start automatically" setting #95

Closed eFail closed 2 years ago

eFail commented 2 years ago

In this commit we make the following changes:

Fix "White Screen of Death"

An issue that many users experience is that after an indeterminate period of time, the main application window becomes a blank white screen. When this happens, the application stops functioning because there is no content to be checked for new notifications anymore. As far as we can tell, this is a bug in Electron, not a bug in this application or Google Voice. To work around this issue, we update our "check for new notifications" interval to be every 3 seconds instead of 1 and add an extra check to see whether the content of the window has become "blank" (the white screen of death). When we detect this state, we automatically reload Google Voice. Since the application is already broken once we detect this state, forcing a reload should have no adverse effect (data loss, for example).

Remove window flicker when starting hidden

Currently, when the "start minimized" setting is enabled, the main application window flickers on screen briefly before it gets hidden. We fix this by reversing our window creation logic. We make the window hidden initially, and then show it only if the "start minimized" setting hasn't been turned on (it's always off by default).

Add "start automatically" setting

Finally, as a companion change to the fixing of the "white screen of death" bug, we make one additional change that hopefully finalizes the user's ability to never miss a notification when using this application. In the settings dialog, we add a new "Start automatically at logon" setting.

image

jerrod-lankford commented 2 years ago

Two minor comments. Looks good otherwise, just need to check it on mac osx. Will do that tomorrow