fix: Ensure thumbnail observer is initialized after history updates

This commit is contained in:
Simon Cordt
2025-09-25 12:20:56 +02:00
parent 851e87fce4
commit 884c5d5fca
+3
View File
@@ -616,6 +616,7 @@
});
state.dom.historyCard = card;
state.dom.historySubtitle = card.querySelector('.pqueue-card__subtitle');
try { UI.ensureThumbObserver(); } catch (err) { /* noop */ }
return card;
},
@@ -685,6 +686,7 @@
state.historyIds = new Set(Array.from(grid.querySelectorAll('.pqueue-history-card')).map((n) => Number(n.getAttribute('data-id'))).filter((v) => v != null));
} catch (err) { /* noop */ }
});
try { UI.ensureThumbObserver(); } catch (err) { /* noop */ }
} catch (err) { /* noop */ }
},
@@ -839,6 +841,7 @@
state.historyPaging.nextCursor = paged?.next_cursor || state.historyPaging.nextCursor;
state.historyPaging.hasMore = !!paged?.has_more || state.historyPaging.hasMore;
if (!state.historyPaging.hasMore && sentinel) sentinel.style.display = 'none';
try { UI.ensureThumbObserver(); } catch (err) { /* noop */ }
} catch (err) { /* noop */ }
},