diff options
author | 2019-04-11 12:00:07 +0200 | |
---|---|---|
committer | 2019-04-11 12:00:07 +0200 | |
commit | e43d6bd80b3d76aae627fa8174eea98c14016549 (patch) | |
tree | de1d0a3ba10100ce68d0cb1ed618095e362fe573 /src/actions/lib/actions.js | |
parent | implements basic release announcement feature (diff) | |
parent | handle deleted services that are attached to workspaces (diff) | |
download | ferdium-app-e43d6bd80b3d76aae627fa8174eea98c14016549.tar.gz ferdium-app-e43d6bd80b3d76aae627fa8174eea98c14016549.tar.zst ferdium-app-e43d6bd80b3d76aae627fa8174eea98c14016549.zip |
merge-in workspace feature
Diffstat (limited to 'src/actions/lib/actions.js')
-rw-r--r-- | src/actions/lib/actions.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/actions/lib/actions.js b/src/actions/lib/actions.js index 6571e9441..2bc7d2711 100644 --- a/src/actions/lib/actions.js +++ b/src/actions/lib/actions.js | |||
@@ -9,6 +9,10 @@ export const createActionsFromDefinitions = (actionDefinitions, validate) => { | |||
9 | actions[actionName] = action; | 9 | actions[actionName] = action; |
10 | action.listeners = []; | 10 | action.listeners = []; |
11 | action.listen = listener => action.listeners.push(listener); | 11 | action.listen = listener => action.listeners.push(listener); |
12 | action.off = (listener) => { | ||
13 | const { listeners } = action; | ||
14 | listeners.splice(listeners.indexOf(listener), 1); | ||
15 | }; | ||
12 | action.notify = params => action.listeners.forEach(listener => listener(params)); | 16 | action.notify = params => action.listeners.forEach(listener => listener(params)); |
13 | }); | 17 | }); |
14 | return actions; | 18 | return actions; |