diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-21 15:04:31 +0100 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-21 15:04:31 +0100 |
commit | a9734f24bf15ab322c8244fbb8e86c37caf30f4a (patch) | |
tree | ace7e455e817df831bf571aa4851a99b0e37e145 /src/features/workspaces/index.js | |
parent | add workspace drawer toggle menu item and shortcut (diff) | |
download | ferdium-app-a9734f24bf15ab322c8244fbb8e86c37caf30f4a.tar.gz ferdium-app-a9734f24bf15ab322c8244fbb8e86c37caf30f4a.tar.zst ferdium-app-a9734f24bf15ab322c8244fbb8e86c37caf30f4a.zip |
improve workspace switching ux
Diffstat (limited to 'src/features/workspaces/index.js')
-rw-r--r-- | src/features/workspaces/index.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js index 26cadea64..1644c0e2f 100644 --- a/src/features/workspaces/index.js +++ b/src/features/workspaces/index.js | |||
@@ -8,10 +8,13 @@ const debug = require('debug')('Franz:feature:workspaces'); | |||
8 | let store = null; | 8 | let store = null; |
9 | 9 | ||
10 | export const filterServicesByActiveWorkspace = (services) => { | 10 | export const filterServicesByActiveWorkspace = (services) => { |
11 | const { isFeatureActive, activeWorkspace } = workspacesState; | 11 | const { |
12 | if (isFeatureActive && activeWorkspace) { | 12 | activeWorkspace, |
13 | return services.filter(s => activeWorkspace.services.includes(s.id)); | 13 | isFeatureActive, |
14 | } | 14 | } = workspacesState; |
15 | |||
16 | if (!isFeatureActive) return services; | ||
17 | if (activeWorkspace) return services.filter(s => activeWorkspace.services.includes(s.id)); | ||
15 | return services; | 18 | return services; |
16 | }; | 19 | }; |
17 | 20 | ||