diff --git a/commafeed-client/src/app/entries/thunks.ts b/commafeed-client/src/app/entries/thunks.ts index 88c5abd1..bb0ea540 100644 --- a/commafeed-client/src/app/entries/thunks.ts +++ b/commafeed-client/src/app/entries/thunks.ts @@ -3,7 +3,7 @@ import { client } from "app/client" import { Constants } from "app/constants" import { type EntrySource, type EntrySourceType, entriesSlice, setMarkAllAsReadConfirmationDialogOpen, setSearch } from "app/entries/slice" import type { RootState } from "app/store" -import { reloadTree } from "app/tree/thunks" +import { reloadTree, selectNextUnreadTreeItem } from "app/tree/thunks" import type { Entry, MarkRequest, TagRequest } from "app/types" import { reloadTags } from "app/user/thunks" import { scrollToWithCallback } from "app/utils" @@ -130,11 +130,12 @@ export const markAllAsReadWithConfirmationIfRequired = createAppAsyncThunk( const source = state.entries.source const entriesTimestamp = state.entries.timestamp ?? Date.now() const markAllAsReadConfirmation = state.user.settings?.markAllAsReadConfirmation + const markAllAsReadNavigateToNextUnread = state.user.settings?.markAllAsReadNavigateToNextUnread if (markAllAsReadConfirmation) { thunkApi.dispatch(setMarkAllAsReadConfirmationDialogOpen(true)) } else { - thunkApi.dispatch( + await thunkApi.dispatch( markAllEntries({ sourceType: source.type, req: { @@ -145,6 +146,9 @@ export const markAllAsReadWithConfirmationIfRequired = createAppAsyncThunk( }, }) ) + const isAllCategorySelected = source.type === "category" && source.id === Constants.categories.all.id + if (markAllAsReadNavigateToNextUnread && !isAllCategorySelected) + await thunkApi.dispatch(selectNextUnreadTreeItem({ direction: "forward" })) } } ) diff --git a/commafeed-client/src/app/types.ts b/commafeed-client/src/app/types.ts index 68a2218d..4db37f19 100644 --- a/commafeed-client/src/app/types.ts +++ b/commafeed-client/src/app/types.ts @@ -248,6 +248,7 @@ export interface Settings { starIconDisplayMode: IconDisplayMode externalLinkIconDisplayMode: IconDisplayMode markAllAsReadConfirmation: boolean + markAllAsReadNavigateToNextUnread: boolean customContextMenu: boolean mobileFooter: boolean unreadCountTitle: boolean diff --git a/commafeed-client/src/app/user/slice.ts b/commafeed-client/src/app/user/slice.ts index 487d27aa..c3ca5c90 100644 --- a/commafeed-client/src/app/user/slice.ts +++ b/commafeed-client/src/app/user/slice.ts @@ -8,6 +8,7 @@ import { changeExternalLinkIconDisplayMode, changeLanguage, changeMarkAllAsReadConfirmation, + changeMarkAllAsReadNavigateToUnread, changeMobileFooter, changePrimaryColor, changeReadingMode, @@ -114,6 +115,10 @@ export const userSlice = createSlice({ if (!state.settings) return state.settings.markAllAsReadConfirmation = action.meta.arg }) + builder.addCase(changeMarkAllAsReadNavigateToUnread.pending, (state, action) => { + if (!state.settings) return + state.settings.markAllAsReadNavigateToNextUnread = action.meta.arg + }) builder.addCase(changeCustomContextMenu.pending, (state, action) => { if (!state.settings) return state.settings.customContextMenu = action.meta.arg @@ -149,6 +154,7 @@ export const userSlice = createSlice({ changeStarIconDisplayMode.fulfilled, changeExternalLinkIconDisplayMode.fulfilled, changeMarkAllAsReadConfirmation.fulfilled, + changeMarkAllAsReadNavigateToUnread.fulfilled, changeCustomContextMenu.fulfilled, changeMobileFooter.fulfilled, changeUnreadCountTitle.fulfilled, diff --git a/commafeed-client/src/app/user/thunks.ts b/commafeed-client/src/app/user/thunks.ts index 855185ea..3829fab0 100644 --- a/commafeed-client/src/app/user/thunks.ts +++ b/commafeed-client/src/app/user/thunks.ts @@ -89,6 +89,15 @@ export const changeMarkAllAsReadConfirmation = createAppAsyncThunk( } ) +export const changeMarkAllAsReadNavigateToUnread = createAppAsyncThunk( + "settings/markAllAsReadNavigateToUnread", + (markAllAsReadNavigateToNextUnread: boolean, thunkApi) => { + const { settings } = thunkApi.getState().user + if (!settings) return + client.user.saveSettings({ ...settings, markAllAsReadNavigateToNextUnread }) + } +) + export const changeCustomContextMenu = createAppAsyncThunk("settings/customContextMenu", (customContextMenu: boolean, thunkApi) => { const { settings } = thunkApi.getState().user if (!settings) return diff --git a/commafeed-client/src/components/MarkAllAsReadConfirmationDialog.tsx b/commafeed-client/src/components/MarkAllAsReadConfirmationDialog.tsx index a6d1cffb..2acb4e68 100644 --- a/commafeed-client/src/components/MarkAllAsReadConfirmationDialog.tsx +++ b/commafeed-client/src/components/MarkAllAsReadConfirmationDialog.tsx @@ -1,8 +1,10 @@ import { Trans } from "@lingui/react/macro" import { Button, Code, Group, Modal, Slider, Stack, Text } from "@mantine/core" +import { Constants } from "app/constants" import { setMarkAllAsReadConfirmationDialogOpen } from "app/entries/slice" import { markAllEntries } from "app/entries/thunks" import { useAppDispatch, useAppSelector } from "app/store" +import { selectNextUnreadTreeItem } from "app/tree/thunks" import { useState } from "react" export function MarkAllAsReadConfirmationDialog() { @@ -11,10 +13,12 @@ export function MarkAllAsReadConfirmationDialog() { const source = useAppSelector(state => state.entries.source) const sourceLabel = useAppSelector(state => state.entries.sourceLabel) const entriesTimestamp = useAppSelector(state => state.entries.timestamp) ?? Date.now() + const markAllAsReadNavigateToNextUnread = useAppSelector(state => state.user.settings?.markAllAsReadNavigateToNextUnread) const dispatch = useAppDispatch() - const onConfirm = () => { - dispatch( + const onConfirm = async () => { + dispatch(setMarkAllAsReadConfirmationDialogOpen(false)) + await dispatch( markAllEntries({ sourceType: source.type, req: { @@ -25,7 +29,9 @@ export function MarkAllAsReadConfirmationDialog() { }, }) ) - dispatch(setMarkAllAsReadConfirmationDialogOpen(false)) + + const isAllCategorySelected = source.type === "category" && source.id === Constants.categories.all.id + if (markAllAsReadNavigateToNextUnread && !isAllCategorySelected) await dispatch(selectNextUnreadTreeItem({ direction: "forward" })) } return ( diff --git a/commafeed-client/src/components/settings/DisplaySettings.tsx b/commafeed-client/src/components/settings/DisplaySettings.tsx index 53d2b78b..32567709 100644 --- a/commafeed-client/src/components/settings/DisplaySettings.tsx +++ b/commafeed-client/src/components/settings/DisplaySettings.tsx @@ -12,6 +12,7 @@ import { changeExternalLinkIconDisplayMode, changeLanguage, changeMarkAllAsReadConfirmation, + changeMarkAllAsReadNavigateToUnread, changeMobileFooter, changePrimaryColor, changeScrollMarks, @@ -36,6 +37,7 @@ export function DisplaySettings() { const starIconDisplayMode = useAppSelector(state => state.user.settings?.starIconDisplayMode) const externalLinkIconDisplayMode = useAppSelector(state => state.user.settings?.externalLinkIconDisplayMode) const markAllAsReadConfirmation = useAppSelector(state => state.user.settings?.markAllAsReadConfirmation) + const markAllAsReadNavigateToNextUnread = useAppSelector(state => state.user.settings?.markAllAsReadNavigateToNextUnread) const customContextMenu = useAppSelector(state => state.user.settings?.customContextMenu) const mobileFooter = useAppSelector(state => state.user.settings?.mobileFooter) const unreadCountTitle = useAppSelector(state => state.user.settings?.unreadCountTitle) @@ -127,6 +129,12 @@ export function DisplaySettings() { onChange={async e => await dispatch(changeMarkAllAsReadConfirmation(e.currentTarget.checked))} /> + Navigate to the next category/feed with unread entries when marking all entries as read} + checked={markAllAsReadNavigateToNextUnread} + onChange={async e => await dispatch(changeMarkAllAsReadNavigateToUnread(e.currentTarget.checked))} + /> + On mobile, show action buttons at the bottom of the screen} checked={mobileFooter} diff --git a/commafeed-client/src/locales/ar/messages.po b/commafeed-client/src/locales/ar/messages.po index 6c21cb45..f7fa76f2 100644 --- a/commafeed-client/src/locales/ar/messages.po +++ b/commafeed-client/src/locales/ar/messages.po @@ -602,6 +602,10 @@ msgstr "الاسم" msgid "Navigate to a subscription by entering its name" msgstr "انتقل إلى اشتراك بإدخال اسمه" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/ca/messages.po b/commafeed-client/src/locales/ca/messages.po index dbe3420e..73659b9e 100644 --- a/commafeed-client/src/locales/ca/messages.po +++ b/commafeed-client/src/locales/ca/messages.po @@ -602,6 +602,10 @@ msgstr "Nom" msgid "Navigate to a subscription by entering its name" msgstr "Navegueu a una subscripció introduint-ne el nom" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/cs/messages.po b/commafeed-client/src/locales/cs/messages.po index 60dbfb1c..708d819c 100644 --- a/commafeed-client/src/locales/cs/messages.po +++ b/commafeed-client/src/locales/cs/messages.po @@ -602,6 +602,10 @@ msgstr "Jméno" msgid "Navigate to a subscription by entering its name" msgstr "Přejděte na předplatné zadáním jeho názvu" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/cy/messages.po b/commafeed-client/src/locales/cy/messages.po index 91139c30..872b9306 100644 --- a/commafeed-client/src/locales/cy/messages.po +++ b/commafeed-client/src/locales/cy/messages.po @@ -602,6 +602,10 @@ msgstr "Enw" msgid "Navigate to a subscription by entering its name" msgstr "Llywiwch i danysgrifiad trwy nodi ei enw" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/da/messages.po b/commafeed-client/src/locales/da/messages.po index 404ede09..5b5523bc 100644 --- a/commafeed-client/src/locales/da/messages.po +++ b/commafeed-client/src/locales/da/messages.po @@ -602,6 +602,10 @@ msgstr "Navn" msgid "Navigate to a subscription by entering its name" msgstr "Naviger til et abonnement ved at indtaste dets navn" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/de/messages.po b/commafeed-client/src/locales/de/messages.po index cddb64eb..79e05b25 100644 --- a/commafeed-client/src/locales/de/messages.po +++ b/commafeed-client/src/locales/de/messages.po @@ -602,6 +602,10 @@ msgstr "" msgid "Navigate to a subscription by entering its name" msgstr "Navigieren Sie zu einem Abonnement, indem Sie seinen Namen eingeben" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/en/messages.po b/commafeed-client/src/locales/en/messages.po index 31fd1543..07122e51 100644 --- a/commafeed-client/src/locales/en/messages.po +++ b/commafeed-client/src/locales/en/messages.po @@ -602,6 +602,10 @@ msgstr "Name" msgid "Navigate to a subscription by entering its name" msgstr "Navigate to a subscription by entering its name" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "Navigate to the next category/feed with unread entries when marking all entries as read" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/es/messages.po b/commafeed-client/src/locales/es/messages.po index 2a7008c2..9beb74b3 100644 --- a/commafeed-client/src/locales/es/messages.po +++ b/commafeed-client/src/locales/es/messages.po @@ -603,6 +603,10 @@ msgstr "Nombre" msgid "Navigate to a subscription by entering its name" msgstr "Navegar a una suscripción introduciendo su nombre" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/fa/messages.po b/commafeed-client/src/locales/fa/messages.po index 5325c253..a7addc0f 100644 --- a/commafeed-client/src/locales/fa/messages.po +++ b/commafeed-client/src/locales/fa/messages.po @@ -602,6 +602,10 @@ msgstr "نام" msgid "Navigate to a subscription by entering its name" msgstr "با وارد کردن نام اشتراک، به آن بروید" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/fi/messages.po b/commafeed-client/src/locales/fi/messages.po index b0c80367..19d6f562 100644 --- a/commafeed-client/src/locales/fi/messages.po +++ b/commafeed-client/src/locales/fi/messages.po @@ -602,6 +602,10 @@ msgstr "Nimi" msgid "Navigate to a subscription by entering its name" msgstr "Siirry tilaukseen kirjoittamalla sen nimi" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/fr/messages.po b/commafeed-client/src/locales/fr/messages.po index f2a7837c..6441868f 100644 --- a/commafeed-client/src/locales/fr/messages.po +++ b/commafeed-client/src/locales/fr/messages.po @@ -602,6 +602,10 @@ msgstr "Nom" msgid "Navigate to a subscription by entering its name" msgstr "Naviguer vers un abonnement en entrant son nom" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/gl/messages.po b/commafeed-client/src/locales/gl/messages.po index f5bc3235..75f1dc25 100644 --- a/commafeed-client/src/locales/gl/messages.po +++ b/commafeed-client/src/locales/gl/messages.po @@ -602,6 +602,10 @@ msgstr "Nome" msgid "Navigate to a subscription by entering its name" msgstr "Navega a unha subscrición introducindo o seu nome" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/hu/messages.po b/commafeed-client/src/locales/hu/messages.po index db89d82e..1259b7c5 100644 --- a/commafeed-client/src/locales/hu/messages.po +++ b/commafeed-client/src/locales/hu/messages.po @@ -602,6 +602,10 @@ msgstr "Név" msgid "Navigate to a subscription by entering its name" msgstr "Navigáljon egy előfizetéshez a nevének megadásával" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/id/messages.po b/commafeed-client/src/locales/id/messages.po index e956cfa0..39d02d42 100644 --- a/commafeed-client/src/locales/id/messages.po +++ b/commafeed-client/src/locales/id/messages.po @@ -602,6 +602,10 @@ msgstr "Nama" msgid "Navigate to a subscription by entering its name" msgstr "Navigasikan ke langganan dengan memasukkan namanya" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/it/messages.po b/commafeed-client/src/locales/it/messages.po index 0b1952e1..7f44e186 100644 --- a/commafeed-client/src/locales/it/messages.po +++ b/commafeed-client/src/locales/it/messages.po @@ -602,6 +602,10 @@ msgstr "Nome" msgid "Navigate to a subscription by entering its name" msgstr "Navigare verso un abbonamento inserendo il suo nome" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/ja/messages.po b/commafeed-client/src/locales/ja/messages.po index 6c2dd8f3..32a60ac8 100644 --- a/commafeed-client/src/locales/ja/messages.po +++ b/commafeed-client/src/locales/ja/messages.po @@ -602,6 +602,10 @@ msgstr "名前" msgid "Navigate to a subscription by entering its name" msgstr "名前を入力してサブスクリプションに移動します" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/ko/messages.po b/commafeed-client/src/locales/ko/messages.po index 965ecec2..5e6fb221 100644 --- a/commafeed-client/src/locales/ko/messages.po +++ b/commafeed-client/src/locales/ko/messages.po @@ -602,6 +602,10 @@ msgstr "이름" msgid "Navigate to a subscription by entering its name" msgstr "이름을 입력하여 구독으로 이동" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/ms/messages.po b/commafeed-client/src/locales/ms/messages.po index 820927dc..c7383c77 100644 --- a/commafeed-client/src/locales/ms/messages.po +++ b/commafeed-client/src/locales/ms/messages.po @@ -602,6 +602,10 @@ msgstr "Nama" msgid "Navigate to a subscription by entering its name" msgstr "Navigasi ke langganan dengan memasukkan namanya" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/nb/messages.po b/commafeed-client/src/locales/nb/messages.po index 9caf587d..3a10cc6f 100644 --- a/commafeed-client/src/locales/nb/messages.po +++ b/commafeed-client/src/locales/nb/messages.po @@ -602,6 +602,10 @@ msgstr "Navn" msgid "Navigate to a subscription by entering its name" msgstr "Naviger til et abonnement ved å skrive inn navnet" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/nl/messages.po b/commafeed-client/src/locales/nl/messages.po index f63e29e8..537fe9c6 100644 --- a/commafeed-client/src/locales/nl/messages.po +++ b/commafeed-client/src/locales/nl/messages.po @@ -602,6 +602,10 @@ msgstr "Naam" msgid "Navigate to a subscription by entering its name" msgstr "Navigeer naar een abonnement door de naam in te voeren" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/nn/messages.po b/commafeed-client/src/locales/nn/messages.po index 5ed36718..52132ce1 100644 --- a/commafeed-client/src/locales/nn/messages.po +++ b/commafeed-client/src/locales/nn/messages.po @@ -602,6 +602,10 @@ msgstr "Navn" msgid "Navigate to a subscription by entering its name" msgstr "Naviger til et abonnement ved å skrive inn navnet" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/pl/messages.po b/commafeed-client/src/locales/pl/messages.po index e450374b..f48d03eb 100644 --- a/commafeed-client/src/locales/pl/messages.po +++ b/commafeed-client/src/locales/pl/messages.po @@ -602,6 +602,10 @@ msgstr "Nazwa" msgid "Navigate to a subscription by entering its name" msgstr "Przejdź do subskrypcji, wpisując jej nazwę" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/pt/messages.po b/commafeed-client/src/locales/pt/messages.po index 7b8a66aa..b219893f 100644 --- a/commafeed-client/src/locales/pt/messages.po +++ b/commafeed-client/src/locales/pt/messages.po @@ -602,6 +602,10 @@ msgstr "Nome" msgid "Navigate to a subscription by entering its name" msgstr "Navegue até uma assinatura digitando seu nome" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/ru/messages.po b/commafeed-client/src/locales/ru/messages.po index 1e72d10f..d677fd8d 100644 --- a/commafeed-client/src/locales/ru/messages.po +++ b/commafeed-client/src/locales/ru/messages.po @@ -602,6 +602,10 @@ msgstr "Имя" msgid "Navigate to a subscription by entering its name" msgstr "Перейдите к подписке, введя ее имя." +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/sk/messages.po b/commafeed-client/src/locales/sk/messages.po index 5a098246..41764e9e 100644 --- a/commafeed-client/src/locales/sk/messages.po +++ b/commafeed-client/src/locales/sk/messages.po @@ -602,6 +602,10 @@ msgstr "Meno" msgid "Navigate to a subscription by entering its name" msgstr "Prejdite na predplatné zadaním jeho názvu" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/sv/messages.po b/commafeed-client/src/locales/sv/messages.po index d31fe4ed..15f71d4f 100644 --- a/commafeed-client/src/locales/sv/messages.po +++ b/commafeed-client/src/locales/sv/messages.po @@ -602,6 +602,10 @@ msgstr "Namn" msgid "Navigate to a subscription by entering its name" msgstr "Navigera till ett abonnemang genom att ange dess namn" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/tr/messages.po b/commafeed-client/src/locales/tr/messages.po index 1a126c0e..3fca6252 100644 --- a/commafeed-client/src/locales/tr/messages.po +++ b/commafeed-client/src/locales/tr/messages.po @@ -602,6 +602,10 @@ msgstr "İsim" msgid "Navigate to a subscription by entering its name" msgstr "Adını girerek bir aboneliğe gidin" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-client/src/locales/zh/messages.po b/commafeed-client/src/locales/zh/messages.po index 7cb044ea..7f7fb2d5 100644 --- a/commafeed-client/src/locales/zh/messages.po +++ b/commafeed-client/src/locales/zh/messages.po @@ -602,6 +602,10 @@ msgstr "​​名称" msgid "Navigate to a subscription by entering its name" msgstr "通过输入订阅名称导航到订阅" +#: src/components/settings/DisplaySettings.tsx +msgid "Navigate to the next category/feed with unread entries when marking all entries as read" +msgstr "" + #: src/components/settings/DisplaySettings.tsx #: src/components/settings/DisplaySettings.tsx msgid "Never" diff --git a/commafeed-server/src/main/java/com/commafeed/backend/model/UserSettings.java b/commafeed-server/src/main/java/com/commafeed/backend/model/UserSettings.java index 69df13ce..61a196ed 100644 --- a/commafeed-server/src/main/java/com/commafeed/backend/model/UserSettings.java +++ b/commafeed-server/src/main/java/com/commafeed/backend/model/UserSettings.java @@ -93,6 +93,7 @@ public class UserSettings extends AbstractModel { private String primaryColor; private boolean markAllAsReadConfirmation; + private boolean markAllAsReadNavigateToNextUnread; private boolean customContextMenu; private boolean mobileFooter; private boolean unreadCountTitle; diff --git a/commafeed-server/src/main/java/com/commafeed/frontend/model/Settings.java b/commafeed-server/src/main/java/com/commafeed/frontend/model/Settings.java index 70bef17e..482800e1 100644 --- a/commafeed-server/src/main/java/com/commafeed/frontend/model/Settings.java +++ b/commafeed-server/src/main/java/com/commafeed/frontend/model/Settings.java @@ -67,6 +67,11 @@ public class Settings implements Serializable { @Schema(description = "ask for confirmation when marking all entries as read", requiredMode = RequiredMode.REQUIRED) private boolean markAllAsReadConfirmation; + @Schema( + description = "navigate to the next unread category or feed after marking all entries as read", + requiredMode = RequiredMode.REQUIRED) + private boolean markAllAsReadNavigateToNextUnread; + @Schema(description = "show commafeed's own context menu on right click", requiredMode = RequiredMode.REQUIRED) private boolean customContextMenu; diff --git a/commafeed-server/src/main/java/com/commafeed/frontend/resource/UserREST.java b/commafeed-server/src/main/java/com/commafeed/frontend/resource/UserREST.java index 2af69b52..8f2b8910 100644 --- a/commafeed-server/src/main/java/com/commafeed/frontend/resource/UserREST.java +++ b/commafeed-server/src/main/java/com/commafeed/frontend/resource/UserREST.java @@ -119,6 +119,7 @@ public class UserREST { s.setStarIconDisplayMode(settings.getStarIconDisplayMode().name()); s.setExternalLinkIconDisplayMode(settings.getExternalLinkIconDisplayMode().name()); s.setMarkAllAsReadConfirmation(settings.isMarkAllAsReadConfirmation()); + s.setMarkAllAsReadNavigateToNextUnread(settings.isMarkAllAsReadNavigateToNextUnread()); s.setCustomContextMenu(settings.isCustomContextMenu()); s.setMobileFooter(settings.isMobileFooter()); s.setUnreadCountTitle(settings.isUnreadCountTitle()); @@ -146,6 +147,7 @@ public class UserREST { s.setStarIconDisplayMode(IconDisplayMode.on_desktop.name()); s.setExternalLinkIconDisplayMode(IconDisplayMode.on_desktop.name()); s.setMarkAllAsReadConfirmation(true); + s.setMarkAllAsReadNavigateToNextUnread(false); s.setCustomContextMenu(true); s.setMobileFooter(false); s.setUnreadCountTitle(false); @@ -180,6 +182,7 @@ public class UserREST { s.setStarIconDisplayMode(IconDisplayMode.valueOf(settings.getStarIconDisplayMode())); s.setExternalLinkIconDisplayMode(IconDisplayMode.valueOf(settings.getExternalLinkIconDisplayMode())); s.setMarkAllAsReadConfirmation(settings.isMarkAllAsReadConfirmation()); + s.setMarkAllAsReadNavigateToNextUnread(settings.isMarkAllAsReadNavigateToNextUnread()); s.setCustomContextMenu(settings.isCustomContextMenu()); s.setMobileFooter(settings.isMobileFooter()); s.setUnreadCountTitle(settings.isUnreadCountTitle()); diff --git a/commafeed-server/src/main/resources/changelogs/db.changelog-5.11.xml b/commafeed-server/src/main/resources/changelogs/db.changelog-5.11.xml new file mode 100644 index 00000000..56424239 --- /dev/null +++ b/commafeed-server/src/main/resources/changelogs/db.changelog-5.11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/commafeed-server/src/main/resources/migrations.xml b/commafeed-server/src/main/resources/migrations.xml index a66ddaee..0726311f 100644 --- a/commafeed-server/src/main/resources/migrations.xml +++ b/commafeed-server/src/main/resources/migrations.xml @@ -35,5 +35,6 @@ + \ No newline at end of file