From 884c5d5fca5618bd3cd66d0e9c162e10faa3a2a4 Mon Sep 17 00:00:00 2001 From: Simon Cordt Date: Thu, 25 Sep 2025 12:20:56 +0200 Subject: [PATCH] fix: Ensure thumbnail observer is initialized after history updates --- web/js/pqueue.ui.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/js/pqueue.ui.js b/web/js/pqueue.ui.js index 6b28f01..46f67f0 100644 --- a/web/js/pqueue.ui.js +++ b/web/js/pqueue.ui.js @@ -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 */ } },