Skip to content

Commit 3ae0397

Browse files
committed
enabledCB
1 parent 154b492 commit 3ae0397

File tree

1 file changed

+9
-4
lines changed
  • services/static-webserver/client/source/class/osparc/support

1 file changed

+9
-4
lines changed

services/static-webserver/client/source/class/osparc/support/Conversation.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,20 @@ qx.Class.define("osparc.support.Conversation", {
148148
const shareProjectLayout = this.getChildControl("share-project-layout");
149149
const currentStudy = osparc.store.Store.getInstance().getCurrentStudy();
150150
let showCB = false;
151+
let enabledCB = false;
151152
if (conversation === null && currentStudy) {
152153
// initiating conversation
153154
showCB = true;
154-
}
155-
if (conversation && conversation.getContextProjectId() && conversation.amIOwner()) {
155+
enabledCB = true;
156+
} else if (conversation) {
156157
// it was already set
157-
showCB = true;
158+
showCB = conversation.getContextProjectId();
159+
enabledCB = conversation.amIOwner();
158160
}
159-
shareProjectLayout.setVisibility(showCB ? "visible" : "excluded");
161+
shareProjectLayout.set({
162+
visibility: showCB ? "visible" : "excluded",
163+
enabled: enabledCB,
164+
});
160165

161166
if (conversation && conversation.getContextProjectId()) {
162167
const projectId = conversation.getContextProjectId();

0 commit comments

Comments
 (0)