Skip to content

Commit 8c16b3c

Browse files
committed
cleanup
1 parent 352dbf9 commit 8c16b3c

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

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

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
qx.Class.define("osparc.support.Conversations", {
2020
extend: qx.ui.core.Widget,
2121

22-
construct: function(openConversationId = null) {
22+
construct: function() {
2323
this.base(arguments);
2424

2525
this._setLayout(new qx.ui.layout.VBox(10));
2626

2727
this.__conversationListItems = [];
28-
this.__openConversationId = openConversationId;
2928

3029
this.__fetchConversations();
3130
},
@@ -51,8 +50,6 @@ qx.Class.define("osparc.support.Conversations", {
5150

5251
members: {
5352
__conversationListItems: null,
54-
__openConversationId: null,
55-
__wsHandlers: null,
5653

5754
_createChildControlImpl: function(id) {
5855
let control;
@@ -82,16 +79,9 @@ qx.Class.define("osparc.support.Conversations", {
8279

8380
osparc.store.ConversationsSupport.getInstance().getConversations()
8481
.then(conversations => {
85-
if (Object.values(conversations).length) {
86-
Object.values(conversations).forEach(conversation => this.__addConversation(conversation));
87-
if (this.__openConversationId) {
88-
const conversationsLayout = this.getChildControl("conversations-layout");
89-
const conversation = conversationsLayout.getSelectables().find(c => c.getConversationId() === this.__openConversationId);
90-
if (conversation) {
91-
conversationsLayout.setSelection([conversation]);
92-
}
93-
this.__openConversationId = null; // reset it so it does not open again
94-
}
82+
const conversationsList = Object.values(conversations);
83+
if (conversationsList.length) {
84+
conversationsList.forEach(conversation => this.__addConversation(conversation));
9585
}
9686
})
9787
.finally(() => {

0 commit comments

Comments
 (0)