Linux: Support showing badge count
This was a macOS-only API before, but it's cross-platform now via `app.setBadgeCount()`
This commit is contained in:
@@ -30,12 +30,11 @@ function downloadFinished (path) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Display string in dock badging area. (OS X)
|
||||
* Display a counter badge for the app. (OS X, Linux)
|
||||
*/
|
||||
function setBadge (text) {
|
||||
if (!app.dock) return
|
||||
log(`setBadge: ${text}`)
|
||||
app.dock.setBadge(String(text))
|
||||
function setBadge (count) {
|
||||
log(`setBadge: ${count}`)
|
||||
app.setBadgeCount(Number(count))
|
||||
}
|
||||
|
||||
function getMenuTemplate () {
|
||||
|
||||
Reference in New Issue
Block a user