1919qx . 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