diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-09-11 14:17:13 +0200 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-09-11 14:17:13 +0200 |
commit | ddab3a88b297fe244971b0d4fb9ff3fca3a8a1fe (patch) | |
tree | 4d1df67bd12c0a4f82c483f1c2d4f6c9e20c4281 /src/features/workspaces | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-ddab3a88b297fe244971b0d4fb9ff3fca3a8a1fe.tar.gz ferdium-app-ddab3a88b297fe244971b0d4fb9ff3fca3a8a1fe.tar.zst ferdium-app-ddab3a88b297fe244971b0d4fb9ff3fca3a8a1fe.zip |
feat(Workspaces): Setting to keep all workspaces loaded
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/actions.js | 1 | ||||
-rw-r--r-- | src/features/workspaces/index.js | 1 | ||||
-rw-r--r-- | src/features/workspaces/store.js | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/features/workspaces/actions.js b/src/features/workspaces/actions.js index a85f8f57f..5b5db422e 100644 --- a/src/features/workspaces/actions.js +++ b/src/features/workspaces/actions.js | |||
@@ -21,6 +21,7 @@ export const workspaceActions = createActionsFromDefinitions({ | |||
21 | deactivate: {}, | 21 | deactivate: {}, |
22 | toggleWorkspaceDrawer: {}, | 22 | toggleWorkspaceDrawer: {}, |
23 | openWorkspaceSettings: {}, | 23 | openWorkspaceSettings: {}, |
24 | toggleKeepAllWorkspacesLoadedSetting: {}, | ||
24 | }, PropTypes.checkPropTypes); | 25 | }, PropTypes.checkPropTypes); |
25 | 26 | ||
26 | export default workspaceActions; | 27 | export default workspaceActions; |
diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js index ad9023b8b..ed3e52096 100644 --- a/src/features/workspaces/index.js +++ b/src/features/workspaces/index.js | |||
@@ -5,6 +5,7 @@ import { resetApiRequests } from './api'; | |||
5 | const debug = require('debug')('Franz:feature:workspaces'); | 5 | const debug = require('debug')('Franz:feature:workspaces'); |
6 | 6 | ||
7 | export const GA_CATEGORY_WORKSPACES = 'Workspaces'; | 7 | export const GA_CATEGORY_WORKSPACES = 'Workspaces'; |
8 | export const DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED = false; | ||
8 | 9 | ||
9 | export const workspaceStore = new WorkspacesStore(); | 10 | export const workspaceStore = new WorkspacesStore(); |
10 | 11 | ||
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 4a1f80b4e..7f41cfc88 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -97,6 +97,7 @@ export default class WorkspacesStore extends FeatureStore { | |||
97 | [workspaceActions.update, this._update], | 97 | [workspaceActions.update, this._update], |
98 | [workspaceActions.activate, this._setActiveWorkspace], | 98 | [workspaceActions.activate, this._setActiveWorkspace], |
99 | [workspaceActions.deactivate, this._deactivateActiveWorkspace], | 99 | [workspaceActions.deactivate, this._deactivateActiveWorkspace], |
100 | [workspaceActions.toggleKeepAllWorkspacesLoadedSetting, this._toggleKeepAllWorkspacesLoadedSetting], | ||
100 | ]); | 101 | ]); |
101 | this._allActions = this._freeUserActions.concat(this._premiumUserActions); | 102 | this._allActions = this._freeUserActions.concat(this._premiumUserActions); |
102 | this._registerActions(this._allActions); | 103 | this._registerActions(this._allActions); |
@@ -245,6 +246,10 @@ export default class WorkspacesStore extends FeatureStore { | |||
245 | await updateWorkspaceRequest.execute(activeWorkspace); | 246 | await updateWorkspaceRequest.execute(activeWorkspace); |
246 | }; | 247 | }; |
247 | 248 | ||
249 | _toggleKeepAllWorkspacesLoadedSetting = async () => { | ||
250 | this._updateSettings({ keepAllWorkspacesLoaded: !this.settings.keepAllWorkspacesLoaded }); | ||
251 | }; | ||
252 | |||
248 | // Reactions | 253 | // Reactions |
249 | 254 | ||
250 | _setFeatureEnabledReaction = () => { | 255 | _setFeatureEnabledReaction = () => { |