diff --git a/CHANGELOG.md b/CHANGELOG.md index 36bf0221e..8b35537de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,13 +13,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). * New viewer for human-readable text files ([#1826](https://github.com/lbryio/lbry-desktop/pull/1826)) * CSV and JSON viewer ([#1410](https://github.com/lbryio/lbry-desktop/pull/1410)) * Recommended content on file viewer page ([#1845](https://github.com/lbryio/lbry-desktop/pull/1845)) + * Desktop notification when publish is completed ([#1892](https://github.com/lbryio/lbry-desktop/pull/1892)) ### Changed * Pass error message from spee.ch API during thumbnail upload ([#1840](https://github.com/lbryio/lbry-desktop/pull/1840)) * Use router pattern for rendering file viewer ([#1544](https://github.com/lbryio/lbry-desktop/pull/1544)) * Missing word "to" added to the Bid Help Text (#1854) * Updated to electron@2 ([#1858](https://github.com/lbryio/lbry-desktop/pull/1858)) - + ### Fixed diff --git a/src/renderer/redux/actions/publish.js b/src/renderer/redux/actions/publish.js index 72926928b..1ab5dcab6 100644 --- a/src/renderer/redux/actions/publish.js +++ b/src/renderer/redux/actions/publish.js @@ -14,6 +14,8 @@ import type { UpdatePublishFormAction, PublishParams, } from 'redux/reducers/publish'; +import { selectosNotificationsEnabled } from 'redux/selectors/settings'; +import { doNavigate } from 'redux/actions/navigation'; import fs from 'fs'; import path from 'path'; @@ -274,6 +276,19 @@ export const doCheckPendingPublishes = () => (dispatch: Dispatch, getState: GetS }); delete pendingPublishMap[claim.name]; + if (selectosNotificationsEnabled(getState())) { + const notif = new window.Notification('LBRY Publish Complete', { + body: `${claim.value.stream.metadata.title} has been published to lbry://${claim.name}. Click here to view it` , + silent: false, + }); + notif.onclick = () => { + dispatch( + doNavigate('/show', { + uri: claim.name, + }) + ); + }; + } } });