Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
feat(renderer): update Notification with icon
Browse files Browse the repository at this point in the history
  • Loading branch information
zenghongtu committed May 11, 2019
1 parent 58ebb31 commit 82f547e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/renderer/layouts/components/Player/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,14 @@ const Player = ({
}, [trackId]);

const handleDownloadStatus = (e, msg) => {
let option;
const option = {
silent: true,
body: '',
};
if (msg.type === 'error') {
option = {
body: '下载失败😭😭😭',
};
option.body = '下载失败😭😭😭';
} else {
option = {
body: '下载成功✌🏻✌🏻✌🏻',
};
option.body = '下载成功✌🏻✌🏻✌🏻';
}
// tslint:disable-next-line:no-unused-expression
new Notification(trackName, option);
Expand Down Expand Up @@ -195,6 +194,8 @@ const Player = ({
const onPlay = () => {
const option = {
body: trackName,
silent: true,
icon: `http:${trackCoverPath}` || DEFAULT_COVER,
};
// tslint:disable-next-line:no-unused-expression
new Notification(albumName, option);
Expand Down

0 comments on commit 82f547e

Please sign in to comment.