also remove video from the dom

This commit is contained in:
Simon
2026-06-24 20:42:37 +00:00
parent e3eeaacc53
commit b931765c06
2 changed files with 19 additions and 5 deletions

View File

@@ -422,14 +422,16 @@ App.feed = App.feed || {};
if (r < 0) return;
const prevActive = state.feedActiveIndex;
// Drop the failed clip's feed slide element from the DOM, then its JSON
// from the queue, then re-key the remaining rendered slides.
removeSlide(r);
videos.splice(r, 1);
reindexAfterRemoval(r);
// Keep the grid's parallel index-based virtualization in sync with the
// now-shorter queue.
if (App.virtualGrid && typeof App.virtualGrid.relayout === 'function') {
App.virtualGrid.relayout();
// Remove the failed clip's grid card element from the DOM too (the grid
// shares the queue) and re-pack the remaining cards.
if (App.virtualGrid && typeof App.virtualGrid.removeVideo === 'function') {
App.virtualGrid.removeVideo(videoId);
}
if (videos.length === 0) {