From d7c1cc00abe7c8097625ee905a1285aa0794a598 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Tue, 17 Feb 2026 19:47:48 -0800 Subject: Remove visual 'selected' state highlight from feed items --- frontend-vanilla/src/main.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'frontend-vanilla/src/main.ts') diff --git a/frontend-vanilla/src/main.ts b/frontend-vanilla/src/main.ts index abe454a..d769990 100644 --- a/frontend-vanilla/src/main.ts +++ b/frontend-vanilla/src/main.ts @@ -231,11 +231,7 @@ export function attachLayoutListeners() { const id = parseInt(itemRow.getAttribute('data-id')!); activeItemId = id; - // Update visual selection - document.querySelectorAll('.feed-item').forEach(el => { - const itemId = parseInt(el.getAttribute('data-id') || '0'); - el.classList.toggle('selected', itemId === activeItemId); - }); + activeItemId = id; const item = store.items.find(i => i._id === id); if (item && !item.read) { @@ -302,7 +298,7 @@ export function renderItems() { contentArea.innerHTML = ` ${store.hasMore ? '
Loading more...
' : ''} `; @@ -854,12 +850,6 @@ function navigateItems(direction: number) { if (nextIndex >= 0 && nextIndex < store.items.length) { activeItemId = store.items[nextIndex]._id; - // Update visual selection without full re-render for speed - document.querySelectorAll('.feed-item').forEach(el => { - const id = parseInt(el.getAttribute('data-id') || '0'); - el.classList.toggle('selected', id === activeItemId); - }); - const el = document.querySelector(`.feed-item[data-id="${activeItemId}"]`); if (el) el.scrollIntoView({ block: 'start', behavior: 'instant' }); -- cgit v1.2.3