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/todos/index.ts | 25 ++----------------------- src/features/todos/store.js | 9 --------- 2 files changed, 2 insertions(+), 32 deletions(-) (limited to 'src/features/todos') diff --git a/src/features/todos/index.ts b/src/features/todos/index.ts index 3665812e6..2fa8c3130 100644 --- a/src/features/todos/index.ts +++ b/src/features/todos/index.ts @@ -1,29 +1,8 @@ -import { reaction } from 'mobx'; import TodoStore from './store'; -const debug = require('debug')('Ferdi:feature:todos'); - export const todosStore = new TodoStore(); -export default function initTodos( - stores: { todos?: any; features?: any }, - actions: any, -) { +export default function initTodos(stores: { todos?: any }, actions: any) { stores.todos = todosStore; - const { features } = stores; - - // Toggle todos feature - reaction( - () => features.features.isTodosEnabled, - isEnabled => { - if (isEnabled) { - debug('Initializing `todos` feature'); - todosStore.start(stores, actions); - } else if (todosStore.isFeatureActive) { - debug('Disabling `todos` feature'); - todosStore.stop(); - } - }, - { fireImmediately: true }, - ); + todosStore.start(stores, actions); } diff --git a/src/features/todos/store.js b/src/features/todos/store.js index 010a029ff..d158ed480 100644 --- a/src/features/todos/store.js +++ b/src/features/todos/store.js @@ -23,8 +23,6 @@ const debug = require('debug')('Ferdi:feature:todos:store'); export default class TodoStore extends FeatureStore { @observable stores = null; - @observable isFeatureEnabled = false; - @observable isFeatureActive = false; @observable webview = null; @@ -123,7 +121,6 @@ export default class TodoStore extends FeatureStore { // REACTIONS this._allReactions = createReactions([ - this._setFeatureEnabledReaction, this._updateTodosConfig, this._firstLaunchReaction, this._routeCheckReaction, @@ -262,12 +259,6 @@ export default class TodoStore extends FeatureStore { // Reactions - _setFeatureEnabledReaction = () => { - const { isTodosEnabled } = this.stores.features.features; - - this.isFeatureEnabled = isTodosEnabled; - }; - _updateTodosConfig = () => { // Resend the config if any part changes in Franz: this._onTodosClientInitialized(); -- cgit v1.2.3-54-g00ecf