diff options
author | 2019-05-22 12:41:05 +0200 | |
---|---|---|
committer | 2019-05-22 12:41:05 +0200 | |
commit | fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1 (patch) | |
tree | 49892eae1b676856c2cecedfceeba396f63eb581 /src/features/workspaces/store.js | |
parent | fix debug message for announcement semver logic (diff) | |
parent | remove version limitation for fetching announcements (diff) | |
download | ferdium-app-fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1.tar.gz ferdium-app-fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1.tar.zst ferdium-app-fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1.zip |
Merge pull request #1426 from meetfranz/fix/announcement-not-shown-within-workspace
Fix/announcement not shown within workspace
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 | }; |