Skip to content

Commit

Permalink
Merge pull request #36 from NBoychev/master
Browse files Browse the repository at this point in the history
Use CRA compatible constants
  • Loading branch information
MatthieuLemoine committed Oct 15, 2018
2 parents 2ddb8fb + e7d6d31 commit 950282e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-push-receiver",
"version": "2.1.1",
"version": "2.1.2",
"description": "A module to receive FCM notifications in electron",
"main": "src/index.js",
"repository": "https://github.com/MatthieuLemoine/electron-push-receiver",
Expand Down
26 changes: 10 additions & 16 deletions src/constants/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
// Event to be sent from renderer process to trigger service start
const START_NOTIFICATION_SERVICE = 'PUSH_RECEIVER:::START_NOTIFICATION_SERVICE';
// Event sent to the renderer process once the service is up
const NOTIFICATION_SERVICE_STARTED = 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_STARTED';
// Event sent to the renderer process if an error has occured during the starting process
const NOTIFICATION_SERVICE_ERROR = 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_ERROR';
// Event sent to the renderer processs when a notification has been received
const NOTIFICATION_RECEIVED = 'PUSH_RECEIVER:::NOTIFICATION_RECEIVED';
// Event sent to the renderer processs when the FCM token has been updated
const TOKEN_UPDATED = 'PUSH_RECEIVER:::TOKEN_UPDATED';

module.exports = {
START_NOTIFICATION_SERVICE,
NOTIFICATION_SERVICE_STARTED,
NOTIFICATION_SERVICE_ERROR,
NOTIFICATION_RECEIVED,
TOKEN_UPDATED,
// Event to be sent from renderer process to trigger service start
START_NOTIFICATION_SERVICE: 'PUSH_RECEIVER:::START_NOTIFICATION_SERVICE',
// Event sent to the renderer process once the service is up
NOTIFICATION_SERVICE_STARTED: 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_STARTED',
// Event sent to the renderer process if an error has occured during the starting process
NOTIFICATION_SERVICE_ERROR: 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_ERROR',
// Event sent to the renderer processs when a notification has been received
NOTIFICATION_RECEIVED: 'PUSH_RECEIVER:::NOTIFICATION_RECEIVED',
// Event sent to the renderer processs when the FCM token has been updated
TOKEN_UPDATED: 'PUSH_RECEIVER:::TOKEN_UPDATED',
};

0 comments on commit 950282e

Please sign in to comment.