From ddbdf506164613cd68194a1406f6855ae9d7f22c Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Mon, 16 Feb 2026 14:07:12 -0800 Subject: v3: fix feed toggle from settings page, add navigation tests When on the settings page and clicking a feed that was previously active, navigate to that feed instead of toggling back to home. The toggle behavior now only applies when already viewing that feed. Added tests for navigating from settings to feeds and tags. Co-Authored-By: Claude Opus 4.6 --- frontend-vanilla/src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'frontend-vanilla/src/main.ts') diff --git a/frontend-vanilla/src/main.ts b/frontend-vanilla/src/main.ts index 3dc0574..94f5727 100644 --- a/frontend-vanilla/src/main.ts +++ b/frontend-vanilla/src/main.ts @@ -128,7 +128,8 @@ export function attachLayoutListeners() { } else if (navType === 'feed') { e.preventDefault(); const feedId = link.getAttribute('data-value')!; - if (store.activeFeedId === parseInt(feedId)) { + const currentRoute = router.getCurrentRoute(); + if (store.activeFeedId === parseInt(feedId) && currentRoute.path !== '/settings') { router.navigate('/', currentQuery); } else { router.navigate(`/feed/${feedId}`, currentQuery); -- cgit v1.2.3