Merge pull request #504 from coralproject/valid-notification-actions

Return a value for notification actions
This commit is contained in:
Kiwi
2017-04-19 16:12:40 +07:00
committed by GitHub
2 changed files with 5 additions and 0 deletions
@@ -1,9 +1,12 @@
import pym from '../services/PymConnection';
import * as actions from '../constants/notification';
export const addNotification = (notifType, text) => {
pym.sendMessage('coral-alert', `${notifType}|${text}`);
return {type: actions.ADD_NOTIFICATION, notifType, text};
};
export const clearNotification = () => {
pym.sendMessage('coral-clear-notification');
return {type: actions.CLEAR_NOTIFICATION};
};
@@ -0,0 +1,2 @@
export const ADD_NOTIFICATION = 'ADD_NOTIFICATION';
export const CLEAR_NOTIFICATION = 'CLEAR_NOTIFICATION';