From 76bf7b840ea7d607a21b0294d10be01b26ad0607 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Fri, 12 Apr 2019 15:51:57 +0200 Subject: merge-in latest develop --- src/features/workspaces/store.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/features/workspaces/store.js') diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index bb18dc182..e11513d1f 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js @@ -14,6 +14,8 @@ import { updateWorkspaceRequest, } from './api'; import { WORKSPACES_ROUTES } from './index'; +import { createReactions } from '../../stores/lib/Reaction'; +import { createActionBindings } from '../utils/ActionBinding'; const debug = require('debug')('Franz:feature:workspaces:store'); @@ -80,41 +82,39 @@ export default class WorkspacesStore extends FeatureStore { // ACTIONS - this._freeUserActions = [ + this._freeUserActions = createActionBindings([ [workspaceActions.toggleWorkspaceDrawer, this._toggleWorkspaceDrawer], [workspaceActions.openWorkspaceSettings, this._openWorkspaceSettings], - ]; - this._premiumUserActions = [ + ]); + this._premiumUserActions = createActionBindings([ [workspaceActions.edit, this._edit], [workspaceActions.create, this._create], [workspaceActions.delete, this._delete], [workspaceActions.update, this._update], [workspaceActions.activate, this._setActiveWorkspace], [workspaceActions.deactivate, this._deactivateActiveWorkspace], - ]; + ]); this._allActions = this._freeUserActions.concat(this._premiumUserActions); this._registerActions(this._allActions); // REACTIONS - this._freeUserReactions = [ + this._freeUserReactions = createReactions([ this._stopPremiumActionsAndReactions, this._openDrawerWithSettingsReaction, this._setFeatureEnabledReaction, this._setIsPremiumFeatureReaction, this._cleanupInvalidServiceReferences, - ]; - this._premiumUserReactions = [ + ]); + this._premiumUserReactions = createReactions([ this._setActiveServiceOnWorkspaceSwitchReaction, this._activateLastUsedWorkspaceReaction, this._setWorkspaceBeingEditedReaction, - ]; + ]); this._allReactions = this._freeUserReactions.concat(this._premiumUserReactions); this._registerReactions(this._allReactions); - console.log(this._reactions); - getUserWorkspacesRequest.execute(); this.isFeatureActive = true; } -- cgit v1.2.3-54-g00ecf