diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-05-08 17:02:09 +0200 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-05-08 17:02:09 +0200 |
commit | 1e38ec5e524c71ae89cd7d4956736494b8c13886 (patch) | |
tree | 73be43066ff504af701e1c201b209db09abdb302 /src/features/workspaces/store.js | |
parent | fix debug message for announcement semver logic (diff) | |
download | ferdium-app-1e38ec5e524c71ae89cd7d4956736494b8c13886.tar.gz ferdium-app-1e38ec5e524c71ae89cd7d4956736494b8c13886.tar.zst ferdium-app-1e38ec5e524c71ae89cd7d4956736494b8c13886.zip |
fix(Announcements): Fixes issue with rendering announcments in workspaces
Diffstat (limited to 'src/features/workspaces/store.js')
-rw-r--r-- | src/features/workspaces/store.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index e11513d1f..3d7043413 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -255,13 +255,15 @@ export default class WorkspacesStore extends FeatureStore { | |||
255 | _setActiveServiceOnWorkspaceSwitchReaction = () => { | 255 | _setActiveServiceOnWorkspaceSwitchReaction = () => { |
256 | if (!this.isFeatureActive) return; | 256 | if (!this.isFeatureActive) return; |
257 | if (this.activeWorkspace) { | 257 | if (this.activeWorkspace) { |
258 | const services = this.stores.services.allDisplayed; | 258 | const activeService = this.stores.services.active; |
259 | const activeService = services.find(s => s.isActive); | ||
260 | const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); | 259 | const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); |
261 | if (workspaceServices.length <= 0) return; | 260 | if (workspaceServices.length <= 0) return; |
262 | const isActiveServiceInWorkspace = workspaceServices.includes(activeService); | 261 | const isActiveServiceInWorkspace = workspaceServices.includes(activeService); |
263 | if (!isActiveServiceInWorkspace) { | 262 | if (!isActiveServiceInWorkspace) { |
264 | this.actions.service.setActive({ serviceId: workspaceServices[0].id }); | 263 | this.actions.service.setActive({ |
264 | serviceId: workspaceServices[0].id, | ||
265 | keepActiveRoute: true, | ||
266 | }); | ||
265 | } | 267 | } |
266 | } | 268 | } |
267 | }; | 269 | }; |