From f4730e9338a1231692fa0b8c226912781143dd37 Mon Sep 17 00:00:00 2001 From: Athou Date: Wed, 4 Jun 2025 08:40:22 +0200 Subject: [PATCH] redirect to 'all' if no unread categories or feeds found or if we reached the end of the list (#1807) --- commafeed-client/src/app/tree/thunks.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commafeed-client/src/app/tree/thunks.ts b/commafeed-client/src/app/tree/thunks.ts index ac0d7a33..1ea66fb1 100644 --- a/commafeed-client/src/app/tree/thunks.ts +++ b/commafeed-client/src/app/tree/thunks.ts @@ -1,5 +1,6 @@ import { createAppAsyncThunk } from "app/async-thunk" import { client } from "app/client" +import { Constants } from "app/constants" import { redirectToCategory, redirectToFeed } from "app/redirect/thunks" import { incrementUnreadCount } from "app/tree/slice" import type { CollapseRequest, Subscription } from "app/types" @@ -53,6 +54,9 @@ export const selectNextUnreadTreeItem = createAppAsyncThunk( } } } + + // redirect to 'all' if no unread categories or feeds found or if we reached the end of the list + thunkApi.dispatch(redirectToCategory(Constants.categories.all.id)) } )