@@ -46,7 +46,6 @@ export default class PublicStreamSidePanel extends Component<Args> {
46
46
@tracked showChat = false ;
47
47
@tracked showRoomChat = false ;
48
48
@tracked showVideoRoom = false ;
49
- @tracked languageList : any = [ ] ;
50
49
51
50
@tracked translationChannels = [ {
52
51
id : '0' ,
@@ -148,22 +147,14 @@ export default class PublicStreamSidePanel extends Component<Args> {
148
147
isGlobalEventRoom : rooms . data . filter ( ( room : any ) => room . relationships [ 'video-stream' ] . data ? room . relationships [ 'video-stream' ] . data . id === stream . id : null ) . map ( ( room : any ) => room . attributes [ 'is-global-event-room' ] ) [ 0 ] ,
149
148
chatRoomName : rooms . data . filter ( ( room : any ) => room . relationships [ 'video-stream' ] . data ? room . relationships [ 'video-stream' ] . data . id === stream . id : null ) . map ( ( room : any ) => room . attributes [ 'chat-room-name' ] ) [ 0 ] ,
150
149
microlocationId : rooms . data . filter ( ( room : any ) => room . relationships [ 'video-stream' ] . data ? room . relationships [ 'video-stream' ] . data . id === stream . id : null ) . map ( ( room : any ) => room . id ) [ 0 ] ,
151
- hash : stringHashCode ( stream . attributes . name + stream . id ) ,
152
- translations : [ ]
153
- } ) ) . forEach ( ( stream : any ) => {
150
+ hash : stringHashCode ( stream . attributes . name + stream . id )
151
+ } ) ) . forEach ( async ( stream : any ) => {
154
152
this . addStream ( stream )
155
153
} ) ;
156
- const languageLists : any = [ ] ;
157
- Promise . all ( this . streams . map ( async ( stream : any ) => {
158
- const res = await this . fetchTranslationChannels ( stream . id ) ;
159
- const item = {
160
- streamId : stream . id
161
- }
162
- languageLists . push ( item ) ;
163
- stream . translations = res ;
164
- } ) ) . then ( ( ) => {
165
- this . languageList = languageLists ;
166
- } )
154
+ this . streams . forEach ( async ( stream : any ) => {
155
+ const res = await this . fetchTranslationChannels ( stream . id )
156
+ stream . translations = res
157
+ } ) ;
167
158
} catch ( e ) {
168
159
console . error ( 'Error while loading rooms in video stream' , e ) ;
169
160
}
@@ -183,9 +174,4 @@ export default class PublicStreamSidePanel extends Component<Args> {
183
174
this . loading = false ;
184
175
this . streams = [ ...this . streams ] ;
185
176
}
186
-
187
-
188
- get streamList ( ) {
189
- return this . streams ;
190
- }
191
177
}
0 commit comments