fix: keep live render harness fallback safe
This commit is contained in:
1 parent
713418dec0
commit
a6a891f079
1 file changed
+18
-2
+18
-2
@@ -12884,7 +12884,15 @@ function renderLiveAnchorActivityScene(streamId, scene, opts){
|
||||
_dedupeLiveProcessedWorklogAnchors(turn);
|
||||
if(typeof _moveLiveRunStatusToTurnEnd==='function') _moveLiveRunStatusToTurnEnd();
|
||||
_restoreMessageScrollSnapshotSameFrame(scrollSnapshot);
|
||||
_restoreLiveAnchorScrollSnapshotAfterRebuild(scrollSnapshot,scrollRebuildGuard);
|
||||
if(typeof _restoreLiveAnchorScrollSnapshotAfterRebuild==='function'){
|
||||
_restoreLiveAnchorScrollSnapshotAfterRebuild(scrollSnapshot,scrollRebuildGuard);
|
||||
}else if(scrollRebuildGuard&&scrollRebuildGuard.release){
|
||||
// Keep extracted test harnesses safe when they omit the shared helper.
|
||||
requestAnimationFrame(()=>{
|
||||
scrollRebuildGuard.release();
|
||||
if(_messageUserUnpinned) _restoreMessageScrollSnapshotSameFrame(scrollSnapshot);
|
||||
});
|
||||
}
|
||||
if(!scrollRebuildGuard.readerAwayFromBottom&&typeof scrollIfPinned==='function') scrollIfPinned();
|
||||
return true;
|
||||
}
|
||||
@@ -12990,7 +12998,15 @@ function _renderLiveAnchorActivitySceneTransparent(streamId, scene, opts){
|
||||
if(renderedRows.length) _syncTransparentEventControls(turn);
|
||||
if(typeof _moveLiveRunStatusToTurnEnd==='function') _moveLiveRunStatusToTurnEnd();
|
||||
_restoreMessageScrollSnapshotSameFrame(scrollSnapshot);
|
||||
_restoreLiveAnchorScrollSnapshotAfterRebuild(scrollSnapshot,scrollRebuildGuard);
|
||||
if(typeof _restoreLiveAnchorScrollSnapshotAfterRebuild==='function'){
|
||||
_restoreLiveAnchorScrollSnapshotAfterRebuild(scrollSnapshot,scrollRebuildGuard);
|
||||
}else if(scrollRebuildGuard&&scrollRebuildGuard.release){
|
||||
// Keep extracted test harnesses safe when they omit the shared helper.
|
||||
requestAnimationFrame(()=>{
|
||||
scrollRebuildGuard.release();
|
||||
if(_messageUserUnpinned) _restoreMessageScrollSnapshotSameFrame(scrollSnapshot);
|
||||
});
|
||||
}
|
||||
if(!scrollRebuildGuard.readerAwayFromBottom&&typeof scrollIfPinned==='function') scrollIfPinned();
|
||||
return !!renderedRows.length;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user