jerrod-lankford / google-voice-desktop-app

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

Implement Taskbar flashing on Windows #81

Closed eFail closed 3 years ago

eFail commented 3 years ago

Changes

Taskbar Flashing

In this change, we update the application to support the FlashWindow feature on Windows. When the Google Voice notification count goes up and the main application window doesn't have focus, it will now flash on the Taskbar to get the user's attention. image

BUG FIX: Prevent Dock bounce on Mac when notification count decreases

I'm fixing this because I believe it's a bug. But if someone lets me know that this assumption was incorrect, this can easily be reverted. Today (on MacOS), the application will tell its Dock icon to bounce anytime the notification count changes to a non-zero value. I believe this should actually only happen if the count goes up. If you read a notification in an external browser window, you probably don't want your Dock icon to bounce because of it.

if (newCount > oldCount) {
    app.dock.bounce();
}

Function name tweak/cleanup

I renamed the following functions:

To the following new names, respectively:

The "Dock" is only applicable to MacOS, so I tweaked the names of these functions for clarity. I also added documentation to help everyone who isn't familiar with what's going on for every OS.

How Tested?