Skip to content

Commit e3f6ffc

Browse files
committed
[skip ci] StudyBrowserContext
1 parent be63dd7 commit e3f6ffc

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

services/static-webserver/client/source/class/osparc/dashboard/ContextBreadcrumbs.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,15 @@ qx.Class.define("osparc.dashboard.ContextBreadcrumbs", {
2424
this._setLayout(new qx.ui.layout.HBox(5).set({
2525
alignY: "middle"
2626
}));
27+
28+
osparc.store.Store.getInstance().addListener("changeStudyBrowserContext", () => this.__rebuild(), this);
2729
},
2830

2931
events: {
3032
"locationChanged": "qx.event.type.Data",
3133
},
3234

3335
properties: {
34-
currentContext: {
35-
check: ["studiesAndFolders", "workspaces", "search", "trash"],
36-
nullable: false,
37-
init: "studiesAndFolders",
38-
event: "changeCurrentContext",
39-
apply: "__rebuild"
40-
},
41-
4236
currentWorkspaceId: {
4337
check: "Number",
4438
nullable: true,
@@ -60,7 +54,8 @@ qx.Class.define("osparc.dashboard.ContextBreadcrumbs", {
6054
__rebuild: function() {
6155
this._removeAll();
6256

63-
if (this.getCurrentContext() !== "studiesAndFolders") {
57+
const currentContext = osparc.store.Store.getInstance().getStudyBrowserContext();
58+
if (currentContext !== "studiesAndFolders") {
6459
return;
6560
}
6661

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
130130
control = new osparc.dashboard.ContextBreadcrumbs();
131131
this.bind("currentWorkspaceId", control, "currentWorkspaceId");
132132
this.bind("currentFolderId", control, "currentFolderId");
133-
this.bind("currentContext", control, "currentContext");
134133
control.bind("currentWorkspaceId", this, "currentWorkspaceId");
135134
control.bind("currentFolderId", this, "currentFolderId");
136135
control.addListener("locationChanged", e => {

0 commit comments

Comments
 (0)