Skip to content

Commit

Permalink
Send a Notification once the download is completed
Browse files Browse the repository at this point in the history
  • Loading branch information
hql287 committed Feb 2, 2018
1 parent aaea3a7 commit 2c78d39
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/components/layout/AppUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import React, { PureComponent } from 'react';
import openDialog from '../../renderers/dialog';
import { Circle } from 'rc-progress';
const ipc = require('electron').ipcRenderer
import i18n from '../../../i18n/i18n';
import { Notify } from '../../../helpers/notify';
const ipc = require('electron').ipcRenderer

// Styled Components
import styled, { keyframes } from 'styled-components';
Expand Down Expand Up @@ -104,6 +105,12 @@ class AppUpdate extends PureComponent {
});

ipc.on('update-downloaded', () => {
// Send notification
Notify({
title: i18n.t('dialog:appUpdate:downloaded:title'),
body: i18n.t('dialog:appUpdate:downloaded:message'),
});
// Open Dialog
openDialog(
{
type: 'info',
Expand Down

0 comments on commit 2c78d39

Please sign in to comment.