From 91c69428ed0dc2dd26b00c6dd5a6684f25515a34 Mon Sep 17 00:00:00 2001 From: Abin Mn Date: Tue, 26 Oct 2021 21:18:20 +0530 Subject: Cleanup/remove feature toggle for todo, workspace, service proxy (#2134) * Remove DEFAULT_FEATURES_CONFIG from config * Remove static controller Co-authored-by: Madhuri B --- src/features/workspaces/index.ts | 22 +--------------------- src/features/workspaces/store.js | 8 -------- 2 files changed, 1 insertion(+), 29 deletions(-) (limited to 'src/features/workspaces') diff --git a/src/features/workspaces/index.ts b/src/features/workspaces/index.ts index ecca64b41..25975936a 100644 --- a/src/features/workspaces/index.ts +++ b/src/features/workspaces/index.ts @@ -1,28 +1,8 @@ -import { reaction } from 'mobx'; import WorkspacesStore from './store'; -import { resetApiRequests } from './api'; - -const debug = require('debug')('Ferdi:feature:workspaces'); export const workspaceStore = new WorkspacesStore(); export default function initWorkspaces(stores, actions) { stores.workspaces = workspaceStore; - const { features } = stores; - - // Toggle workspace feature - reaction( - () => features.features.isWorkspaceEnabled, - isEnabled => { - if (isEnabled && !workspaceStore.isFeatureActive) { - debug('Initializing `workspaces` feature'); - workspaceStore.start(stores, actions); - } else if (workspaceStore.isFeatureActive) { - debug('Disabling `workspaces` feature'); - workspaceStore.stop(); - resetApiRequests(); - } - }, - { fireImmediately: true }, - ); + workspaceStore.start(stores, actions); } diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 0fa43b723..17ec17b3a 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js @@ -18,8 +18,6 @@ import { KEEP_WS_LOADED_USID } from '../../config'; const debug = require('debug')('Ferdi:feature:workspaces:store'); export default class WorkspacesStore extends FeatureStore { - @observable isFeatureEnabled = true; - @observable isFeatureActive = false; @observable activeWorkspace = null; @@ -97,7 +95,6 @@ export default class WorkspacesStore extends FeatureStore { this._allReactions = createReactions([ this._openDrawerWithSettingsReaction, - this._setFeatureEnabledReaction, this._cleanupInvalidServiceReferences, this._setActiveServiceOnWorkspaceSwitchReaction, this._activateLastUsedWorkspaceReaction, @@ -251,11 +248,6 @@ export default class WorkspacesStore extends FeatureStore { // Reactions - _setFeatureEnabledReaction = () => { - const { isWorkspaceEnabled } = this.stores.features.features; - this.isFeatureEnabled = isWorkspaceEnabled; - }; - _setWorkspaceBeingEditedReaction = () => { const { pathname } = this.stores.router.location; const match = matchRoute('/settings/workspaces/edit/:id', pathname); -- cgit v1.2.3-54-g00ecf