Skip to content

Commit

Permalink
fix: openDownloadDock & updateDockBadge mac only
Browse files Browse the repository at this point in the history
  • Loading branch information
agalwood committed Feb 20, 2019
1 parent c12c130 commit 3e2b448
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/renderer/components/Native/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,21 @@ export function moveTaskFilesToTrash (task, messages = {}) {
}

export function openDownloadDock (path) {
if (!is.macOS()) {
return
}
remote.app.dock.downloadFinished(path)
}

export function updateDockBadge (text) {
if (!is.macOS()) {
return
}
remote.app.dock.setBadge(text)
}

export function showDownloadSpeedInDock (downloadSpeed) {
if (is.windows()) {
if (!is.macOS()) {
return
}
const text = downloadSpeed > 0 ? bytesToSize(downloadSpeed) : ''
Expand Down

0 comments on commit 3e2b448

Please sign in to comment.