@@ -154,10 +154,6 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
154
154
console . warn ( `${ activeRoomId } is current in RVS but missing from client - clearing sticky room` ) ;
155
155
await this . algorithm . setStickyRoom ( null ) ;
156
156
} else if ( activeRoom !== this . algorithm . stickyRoom ) {
157
- if ( ! window . mx_QuietRoomListLogging ) {
158
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
159
- console . log ( `Changing sticky room to ${ activeRoomId } ` ) ;
160
- }
161
157
await this . algorithm . setStickyRoom ( activeRoom ) ;
162
158
}
163
159
}
@@ -218,20 +214,12 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
218
214
console . warn ( `Own read receipt was in unknown room ${ room . roomId } ` ) ;
219
215
return ;
220
216
}
221
- if ( ! window . mx_QuietRoomListLogging ) {
222
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
223
- console . log ( `[RoomListDebug] Got own read receipt in ${ room . roomId } ` ) ;
224
- }
225
217
await this . handleRoomUpdate ( room , RoomUpdateCause . ReadReceipt ) ;
226
218
this . updateFn . trigger ( ) ;
227
219
return ;
228
220
}
229
221
} else if ( payload . action === 'MatrixActions.Room.tags' ) {
230
222
const roomPayload = ( < any > payload ) ; // TODO: Type out the dispatcher types
231
- if ( ! window . mx_QuietRoomListLogging ) {
232
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
233
- console . log ( `[RoomListDebug] Got tag change in ${ roomPayload . room . roomId } ` ) ;
234
- }
235
223
await this . handleRoomUpdate ( roomPayload . room , RoomUpdateCause . PossibleTagChange ) ;
236
224
this . updateFn . trigger ( ) ;
237
225
} else if ( payload . action === 'MatrixActions.Room.timeline' ) {
@@ -243,16 +231,7 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
243
231
const roomId = eventPayload . event . getRoomId ( ) ;
244
232
const room = this . matrixClient . getRoom ( roomId ) ;
245
233
const tryUpdate = async ( updatedRoom : Room ) => {
246
- if ( ! window . mx_QuietRoomListLogging ) {
247
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
248
- console . log ( `[RoomListDebug] Live timeline event ${ eventPayload . event . getId ( ) } ` +
249
- ` in ${ updatedRoom . roomId } ` ) ;
250
- }
251
234
if ( eventPayload . event . getType ( ) === 'm.room.tombstone' && eventPayload . event . getStateKey ( ) === '' ) {
252
- if ( ! window . mx_QuietRoomListLogging ) {
253
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
254
- console . log ( `[RoomListDebug] Got tombstone event - trying to remove now-dead room` ) ;
255
- }
256
235
const newRoom = this . matrixClient . getRoom ( eventPayload . event . getContent ( ) [ 'replacement_room' ] ) ;
257
236
if ( newRoom ) {
258
237
// If we have the new room, then the new room check will have seen the predecessor
@@ -282,18 +261,10 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
282
261
console . warn ( `Event ${ eventPayload . event . getId ( ) } was decrypted in an unknown room ${ roomId } ` ) ;
283
262
return ;
284
263
}
285
- if ( ! window . mx_QuietRoomListLogging ) {
286
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
287
- console . log ( `[RoomListDebug] Decrypted timeline event ${ eventPayload . event . getId ( ) } in ${ roomId } ` ) ;
288
- }
289
264
await this . handleRoomUpdate ( room , RoomUpdateCause . Timeline ) ;
290
265
this . updateFn . trigger ( ) ;
291
266
} else if ( payload . action === 'MatrixActions.accountData' && payload . event_type === 'm.direct' ) {
292
267
const eventPayload = ( < any > payload ) ; // TODO: Type out the dispatcher types
293
- if ( ! window . mx_QuietRoomListLogging ) {
294
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
295
- console . log ( `[RoomListDebug] Received updated DM map` ) ;
296
- }
297
268
const dmMap = eventPayload . event . getContent ( ) ;
298
269
for ( const userId of Object . keys ( dmMap ) ) {
299
270
const roomIds = dmMap [ userId ] ;
@@ -317,65 +288,36 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
317
288
const oldMembership = getEffectiveMembership ( membershipPayload . oldMembership ) ;
318
289
const newMembership = getEffectiveMembership ( membershipPayload . membership ) ;
319
290
if ( oldMembership !== EffectiveMembership . Join && newMembership === EffectiveMembership . Join ) {
320
- if ( ! window . mx_QuietRoomListLogging ) {
321
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
322
- console . log ( `[RoomListDebug] Handling new room ${ membershipPayload . room . roomId } ` ) ;
323
- }
324
-
325
291
// If we're joining an upgraded room, we'll want to make sure we don't proliferate
326
292
// the dead room in the list.
327
293
const createEvent = membershipPayload . room . currentState . getStateEvents ( "m.room.create" , "" ) ;
328
294
if ( createEvent && createEvent . getContent ( ) [ 'predecessor' ] ) {
329
- if ( ! window . mx_QuietRoomListLogging ) {
330
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
331
- console . log ( `[RoomListDebug] Room has a predecessor` ) ;
332
- }
333
295
const prevRoom = this . matrixClient . getRoom ( createEvent . getContent ( ) [ 'predecessor' ] [ 'room_id' ] ) ;
334
296
if ( prevRoom ) {
335
297
const isSticky = this . algorithm . stickyRoom === prevRoom ;
336
298
if ( isSticky ) {
337
- if ( ! window . mx_QuietRoomListLogging ) {
338
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
339
- console . log ( `[RoomListDebug] Clearing sticky room due to room upgrade` ) ;
340
- }
341
299
await this . algorithm . setStickyRoom ( null ) ;
342
300
}
343
301
344
302
// Note: we hit the algorithm instead of our handleRoomUpdate() function to
345
303
// avoid redundant updates.
346
- if ( ! window . mx_QuietRoomListLogging ) {
347
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
348
- console . log ( `[RoomListDebug] Removing previous room from room list` ) ;
349
- }
350
304
await this . algorithm . handleRoomUpdate ( prevRoom , RoomUpdateCause . RoomRemoved ) ;
351
305
}
352
306
}
353
307
354
- if ( ! window . mx_QuietRoomListLogging ) {
355
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
356
- console . log ( `[RoomListDebug] Adding new room to room list` ) ;
357
- }
358
308
await this . handleRoomUpdate ( membershipPayload . room , RoomUpdateCause . NewRoom ) ;
359
309
this . updateFn . trigger ( ) ;
360
310
return ;
361
311
}
362
312
363
313
if ( oldMembership !== EffectiveMembership . Invite && newMembership === EffectiveMembership . Invite ) {
364
- if ( ! window . mx_QuietRoomListLogging ) {
365
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
366
- console . log ( `[RoomListDebug] Handling invite to ${ membershipPayload . room . roomId } ` ) ;
367
- }
368
314
await this . handleRoomUpdate ( membershipPayload . room , RoomUpdateCause . NewRoom ) ;
369
315
this . updateFn . trigger ( ) ;
370
316
return ;
371
317
}
372
318
373
319
// If it's not a join, it's transitioning into a different list (possibly historical)
374
320
if ( oldMembership !== newMembership ) {
375
- if ( ! window . mx_QuietRoomListLogging ) {
376
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
377
- console . log ( `[RoomListDebug] Handling membership change in ${ membershipPayload . room . roomId } ` ) ;
378
- }
379
321
await this . handleRoomUpdate ( membershipPayload . room , RoomUpdateCause . PossibleTagChange ) ;
380
322
this . updateFn . trigger ( ) ;
381
323
return ;
@@ -386,10 +328,6 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
386
328
private async handleRoomUpdate ( room : Room , cause : RoomUpdateCause ) : Promise < any > {
387
329
const shouldUpdate = await this . algorithm . handleRoomUpdate ( room , cause ) ;
388
330
if ( shouldUpdate ) {
389
- if ( ! window . mx_QuietRoomListLogging ) {
390
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
391
- console . log ( `[DEBUG] Room "${ room . name } " (${ room . roomId } ) triggered by ${ cause } requires list update` ) ;
392
- }
393
331
this . updateFn . mark ( ) ;
394
332
}
395
333
}
@@ -509,10 +447,6 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
509
447
}
510
448
511
449
private onAlgorithmListUpdated = ( ) => {
512
- if ( ! window . mx_QuietRoomListLogging ) {
513
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
514
- console . log ( "Underlying algorithm has triggered a list update - marking" ) ;
515
- }
516
450
this . updateFn . mark ( ) ;
517
451
} ;
518
452
@@ -559,10 +493,6 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
559
493
}
560
494
561
495
public addFilter ( filter : IFilterCondition ) : void {
562
- if ( ! window . mx_QuietRoomListLogging ) {
563
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
564
- console . log ( "Adding filter condition:" , filter ) ;
565
- }
566
496
this . filterConditions . push ( filter ) ;
567
497
if ( this . algorithm ) {
568
498
this . algorithm . addFilterCondition ( filter ) ;
@@ -571,10 +501,6 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
571
501
}
572
502
573
503
public removeFilter ( filter : IFilterCondition ) : void {
574
- if ( ! window . mx_QuietRoomListLogging ) {
575
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
576
- console . log ( "Removing filter condition:" , filter ) ;
577
- }
578
504
const idx = this . filterConditions . indexOf ( filter ) ;
579
505
if ( idx >= 0 ) {
580
506
this . filterConditions . splice ( idx , 1 ) ;
0 commit comments