aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-09-12 09:48:12 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-09-12 09:48:12 +0200
commit8884afef941c94ca8273d612bc75ea75e8f82c44 (patch)
tree21a2a828ca6e90da8494157020f1943e67bc9be5 /src/features
parentfix linting issues (diff)
parentMerge pull request #1606 from meetfranz/feature/keep-all-workspaces-loaded-op... (diff)
downloadferdium-app-8884afef941c94ca8273d612bc75ea75e8f82c44.tar.gz
ferdium-app-8884afef941c94ca8273d612bc75ea75e8f82c44.tar.zst
ferdium-app-8884afef941c94ca8273d612bc75ea75e8f82c44.zip
Merge branch 'develop' of https://github.com/meetfranz/franz into develop
Diffstat (limited to 'src/features')
-rw-r--r--src/features/workspaces/actions.js1
-rw-r--r--src/features/workspaces/index.js1
-rw-r--r--src/features/workspaces/store.js5
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
26export default workspaceActions; 27export 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';
5const debug = require('debug')('Franz:feature:workspaces'); 5const debug = require('debug')('Franz:feature:workspaces');
6 6
7export const GA_CATEGORY_WORKSPACES = 'Workspaces'; 7export const GA_CATEGORY_WORKSPACES = 'Workspaces';
8export const DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED = false;
8 9
9export const workspaceStore = new WorkspacesStore(); 10export 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 = () => {