mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-15 17:27:08 +00:00
The current check for `count` means the value to reset/remove the badge (`''`) is treated as `false` and therefore the badge does not get removed. This PR changes the check for `undefined` instead which resolves the issue. Related issue: https://github.com/nativefier/nativefier/issues/1251 Testing performed: - I ran `npm t` as per the docs. All tests passed. - I created a new app build for Twitter (`https://twitter.com`) and Messenger (`https://messenger.com`) to verify the correct behaviour. Both were showed the issue as resolved. Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
This commit is contained in:
parent
629369d885
commit
5e526fb000
@ -169,7 +169,7 @@ if (appArgs.lang) {
|
||||
let currentBadgeCount = 0;
|
||||
const setDockBadge = isOSX()
|
||||
? (count?: number | string, bounce = false): void => {
|
||||
if (count) {
|
||||
if (count !== undefined) {
|
||||
app.dock.setBadge(count.toString());
|
||||
if (bounce && count > currentBadgeCount) app.dock.bounce();
|
||||
currentBadgeCount = typeof count === 'number' ? count : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user