Skip to content

Commit c604929

Browse files
committed
prop
1 parent bfbbfea commit c604929

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

services/static-webserver/client/source/class/osparc/study/Conversations.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ qx.Class.define("osparc.study.Conversations", {
2020
extend: qx.ui.core.Widget,
2121

2222
/**
23-
* @param studyData {String} Study Data
23+
* @param studyData {Object} Study Data
2424
*/
2525
construct: function(studyData) {
2626
this.base(arguments);
@@ -29,11 +29,22 @@ qx.Class.define("osparc.study.Conversations", {
2929

3030
this.__conversations = [];
3131

32-
this.fetchConversations(studyData);
32+
this.set({
33+
studyData,
34+
});
3335

3436
this.__listenToConversationWS();
3537
},
3638

39+
properties: {
40+
studyData: {
41+
check: "Object",
42+
init: null,
43+
nullable: false,
44+
apply: "__applyStudyData",
45+
},
46+
},
47+
3748
statics: {
3849
popUpInWindow: function(studyData) {
3950
const conversations = new osparc.study.Conversations(studyData);
@@ -177,13 +188,13 @@ qx.Class.define("osparc.study.Conversations", {
177188
if (conversation) {
178189
switch (eventName) {
179190
case "conversation:created":
180-
conversation.addMessage(conversation);
191+
this.__addConversation(conversation);
181192
break;
182193
case "conversation:updated":
183-
conversation.updateMessage(conversation);
194+
this.__updateConversation(conversation);
184195
break;
185196
case "conversation:deleted":
186-
conversation.deleteMessage(conversation);
197+
this.__deleteConversation(conversation);
187198
break;
188199
}
189200
}
@@ -225,7 +236,7 @@ qx.Class.define("osparc.study.Conversations", {
225236
return this.__conversations.find(conversation => conversation.getConversationId() === conversationId);
226237
},
227238

228-
fetchConversations: function(studyData) {
239+
__applyStudyData: function(studyData) {
229240
const loadMoreButton = this.getChildControl("loading-button");
230241
loadMoreButton.setFetching(true);
231242

0 commit comments

Comments
 (0)