@@ -1409,24 +1409,16 @@ class TimelinePanel extends React.Component<IProps, IState> {
1409
1409
// quite slow. So we detect that situation and shortcut straight to
1410
1410
// calling _reloadEvents and updating the state.
1411
1411
1412
- const timeline = this . props . timelineSet . getTimelineForEvent ( eventId ) ;
1413
- if ( timeline ) {
1414
- // This is a hot-path optimization by skipping a promise tick
1415
- // by repeating a no-op sync branch in TimelineSet.getTimelineForEvent & MatrixClient.getEventTimeline
1416
- this . timelineWindow . load ( eventId , INITIAL_SIZE ) ; // in this branch this method will happen in sync time
1417
- onLoaded ( ) ;
1418
- } else {
1419
- const prom = this . timelineWindow . load ( eventId , INITIAL_SIZE ) ;
1420
- this . buildLegacyCallEventGroupers ( ) ;
1421
- this . setState ( {
1422
- events : [ ] ,
1423
- liveEvents : [ ] ,
1424
- canBackPaginate : false ,
1425
- canForwardPaginate : false ,
1426
- timelineLoading : true ,
1427
- } ) ;
1428
- prom . then ( onLoaded , onError ) ;
1429
- }
1412
+ const prom = this . timelineWindow . load ( eventId , INITIAL_SIZE ) ;
1413
+ this . buildLegacyCallEventGroupers ( ) ;
1414
+ this . setState ( {
1415
+ events : [ ] ,
1416
+ liveEvents : [ ] ,
1417
+ canBackPaginate : false ,
1418
+ canForwardPaginate : false ,
1419
+ timelineLoading : true ,
1420
+ } ) ;
1421
+ prom . then ( onLoaded , onError ) ;
1430
1422
}
1431
1423
1432
1424
// handle the completion of a timeline load or localEchoUpdate, by
@@ -1443,8 +1435,8 @@ class TimelinePanel extends React.Component<IProps, IState> {
1443
1435
}
1444
1436
1445
1437
// Force refresh the timeline before threads support pending events
1446
- public refreshTimeline ( ) : void {
1447
- this . loadTimeline ( ) ;
1438
+ public refreshTimeline ( eventId ?: string ) : void {
1439
+ this . loadTimeline ( eventId , undefined , undefined , false ) ;
1448
1440
this . reloadEvents ( ) ;
1449
1441
}
1450
1442
0 commit comments