From cb779ec49489b9c5b18706b2896a5d6f6723cd22 Mon Sep 17 00:00:00 2001 From: Athou Date: Thu, 3 Aug 2023 08:46:43 +0200 Subject: [PATCH] add setting to disable mark as read confirmation (#1110) --- commafeed-client/src/app/slices/user.ts | 16 +++++++++++ commafeed-client/src/app/types.ts | 1 + .../components/header/MarkAllAsReadButton.tsx | 28 +++++++++++++------ .../components/settings/DisplaySettings.tsx | 8 ++++++ commafeed-client/src/locales/ar/messages.po | 4 +++ commafeed-client/src/locales/ca/messages.po | 4 +++ commafeed-client/src/locales/cs/messages.po | 4 +++ commafeed-client/src/locales/cy/messages.po | 4 +++ commafeed-client/src/locales/da/messages.po | 4 +++ commafeed-client/src/locales/de/messages.po | 4 +++ commafeed-client/src/locales/en/messages.po | 4 +++ commafeed-client/src/locales/es/messages.po | 4 +++ commafeed-client/src/locales/fa/messages.po | 4 +++ commafeed-client/src/locales/fi/messages.po | 4 +++ commafeed-client/src/locales/fr/messages.po | 4 +++ commafeed-client/src/locales/gl/messages.po | 4 +++ commafeed-client/src/locales/hu/messages.po | 4 +++ commafeed-client/src/locales/id/messages.po | 4 +++ commafeed-client/src/locales/it/messages.po | 4 +++ commafeed-client/src/locales/ja/messages.po | 4 +++ commafeed-client/src/locales/ko/messages.po | 4 +++ commafeed-client/src/locales/ms/messages.po | 4 +++ commafeed-client/src/locales/nb/messages.po | 4 +++ commafeed-client/src/locales/nl/messages.po | 4 +++ commafeed-client/src/locales/nn/messages.po | 4 +++ commafeed-client/src/locales/pl/messages.po | 4 +++ commafeed-client/src/locales/pt/messages.po | 4 +++ commafeed-client/src/locales/ru/messages.po | 4 +++ commafeed-client/src/locales/sk/messages.po | 4 +++ commafeed-client/src/locales/sv/messages.po | 4 +++ commafeed-client/src/locales/tr/messages.po | 4 +++ commafeed-client/src/locales/zh/messages.po | 4 +++ .../commafeed/backend/model/UserSettings.java | 1 + .../commafeed/frontend/model/Settings.java | 3 ++ .../commafeed/frontend/resource/UserREST.java | 3 ++ .../resources/changelogs/db.changelog-3.9.xml | 14 ++++++++++ .../src/main/resources/migrations.xml | 1 + 37 files changed, 179 insertions(+), 8 deletions(-) create mode 100644 commafeed-server/src/main/resources/changelogs/db.changelog-3.9.xml diff --git a/commafeed-client/src/app/slices/user.ts b/commafeed-client/src/app/slices/user.ts index 87f96a40..dacb5fc4 100644 --- a/commafeed-client/src/app/slices/user.ts +++ b/commafeed-client/src/app/slices/user.ts @@ -91,6 +91,17 @@ export const changeAlwaysScrollToEntry = createAsyncThunk< if (!settings) return client.user.saveSettings({ ...settings, alwaysScrollToEntry }) }) +export const changeMarkAllAsReadConfirmation = createAsyncThunk< + void, + boolean, + { + state: RootState + } +>("settings/markAllAsReadConfirmation", (markAllAsReadConfirmation, thunkApi) => { + const { settings } = thunkApi.getState().user + if (!settings) return + client.user.saveSettings({ ...settings, markAllAsReadConfirmation }) +}) export const changeSharingSetting = createAsyncThunk< void, { site: keyof SharingSettings; value: boolean }, @@ -151,6 +162,10 @@ export const userSlice = createSlice({ if (!state.settings) return state.settings.alwaysScrollToEntry = action.meta.arg }) + builder.addCase(changeMarkAllAsReadConfirmation.pending, (state, action) => { + if (!state.settings) return + state.settings.markAllAsReadConfirmation = action.meta.arg + }) builder.addCase(changeSharingSetting.pending, (state, action) => { if (!state.settings) return state.settings.sharingSettings[action.meta.arg.site] = action.meta.arg.value @@ -162,6 +177,7 @@ export const userSlice = createSlice({ changeShowRead.fulfilled, changeScrollMarks.fulfilled, changeAlwaysScrollToEntry.fulfilled, + changeMarkAllAsReadConfirmation.fulfilled, changeSharingSetting.fulfilled ), () => { diff --git a/commafeed-client/src/app/types.ts b/commafeed-client/src/app/types.ts index b7b7798f..8b134bf2 100644 --- a/commafeed-client/src/app/types.ts +++ b/commafeed-client/src/app/types.ts @@ -202,6 +202,7 @@ export interface Settings { customJs?: string scrollSpeed: number alwaysScrollToEntry: boolean + markAllAsReadConfirmation: boolean sharingSettings: SharingSettings } diff --git a/commafeed-client/src/components/header/MarkAllAsReadButton.tsx b/commafeed-client/src/components/header/MarkAllAsReadButton.tsx index eb8578ff..ceafa807 100644 --- a/commafeed-client/src/components/header/MarkAllAsReadButton.tsx +++ b/commafeed-client/src/components/header/MarkAllAsReadButton.tsx @@ -13,8 +13,27 @@ export function MarkAllAsReadButton(props: { iconSize: number }) { const source = useAppSelector(state => state.entries.source) const sourceLabel = useAppSelector(state => state.entries.sourceLabel) const entriesTimestamp = useAppSelector(state => state.entries.timestamp) ?? Date.now() + const markAllAsReadConfirmation = useAppSelector(state => state.user.settings?.markAllAsReadConfirmation) const dispatch = useAppDispatch() + const buttonClicked = () => { + if (markAllAsReadConfirmation) { + setThreshold(0) + setOpened(true) + } else { + dispatch( + markAllEntries({ + sourceType: source.type, + req: { + id: source.id, + read: true, + olderThan: entriesTimestamp, + }, + }) + ) + } + } + return ( <> setOpened(false)} title={Mark all entries as read}> @@ -70,14 +89,7 @@ export function MarkAllAsReadButton(props: { iconSize: number }) { - } - label={Mark all as read} - onClick={() => { - setThreshold(0) - setOpened(true) - }} - /> + } label={Mark all as read} onClick={buttonClicked} /> ) } diff --git a/commafeed-client/src/components/settings/DisplaySettings.tsx b/commafeed-client/src/components/settings/DisplaySettings.tsx index 52efef47..0cf529af 100644 --- a/commafeed-client/src/components/settings/DisplaySettings.tsx +++ b/commafeed-client/src/components/settings/DisplaySettings.tsx @@ -4,6 +4,7 @@ import { Constants } from "app/constants" import { changeAlwaysScrollToEntry, changeLanguage, + changeMarkAllAsReadConfirmation, changeScrollMarks, changeScrollSpeed, changeSharingSetting, @@ -19,6 +20,7 @@ export function DisplaySettings() { const showRead = useAppSelector(state => state.user.settings?.showRead) const scrollMarks = useAppSelector(state => state.user.settings?.scrollMarks) const alwaysScrollToEntry = useAppSelector(state => state.user.settings?.alwaysScrollToEntry) + const markAllAsReadConfirmation = useAppSelector(state => state.user.settings?.markAllAsReadConfirmation) const sharingSettings = useAppSelector(state => state.user.settings?.sharingSettings) const dispatch = useAppDispatch() @@ -58,6 +60,12 @@ export function DisplaySettings() { onChange={e => dispatch(changeScrollMarks(e.currentTarget.checked))} /> + Show confirmation when marking all entries as read} + checked={markAllAsReadConfirmation} + onChange={e => dispatch(changeMarkAllAsReadConfirmation(e.currentTarget.checked))} + /> + Sharing sites} labelPosition="center" /> diff --git a/commafeed-client/src/locales/ar/messages.po b/commafeed-client/src/locales/ar/messages.po index 0ef9c608..4ea7e775 100644 --- a/commafeed-client/src/locales/ar/messages.po +++ b/commafeed-client/src/locales/ar/messages.po @@ -727,6 +727,10 @@ msgstr "مشاركة المواقع" msgid "Shift" msgstr "الحلقة" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/ca/messages.po b/commafeed-client/src/locales/ca/messages.po index 9aeb592f..79e986ef 100644 --- a/commafeed-client/src/locales/ca/messages.po +++ b/commafeed-client/src/locales/ca/messages.po @@ -727,6 +727,10 @@ msgstr "Compartir llocs" msgid "Shift" msgstr "canvi" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/cs/messages.po b/commafeed-client/src/locales/cs/messages.po index a7b799f9..1e72d23d 100644 --- a/commafeed-client/src/locales/cs/messages.po +++ b/commafeed-client/src/locales/cs/messages.po @@ -727,6 +727,10 @@ msgstr "Stránky pro sdílení" msgid "Shift" msgstr "Směna" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/cy/messages.po b/commafeed-client/src/locales/cy/messages.po index 9acb66d7..ff6a2cf4 100644 --- a/commafeed-client/src/locales/cy/messages.po +++ b/commafeed-client/src/locales/cy/messages.po @@ -727,6 +727,10 @@ msgstr "Rhannu gwefannau" msgid "Shift" msgstr "shifft" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/da/messages.po b/commafeed-client/src/locales/da/messages.po index 972f1af9..d525a290 100644 --- a/commafeed-client/src/locales/da/messages.po +++ b/commafeed-client/src/locales/da/messages.po @@ -727,6 +727,10 @@ msgstr "Delingssider" msgid "Shift" msgstr "Skift" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/de/messages.po b/commafeed-client/src/locales/de/messages.po index f251089f..e2f3fc8a 100644 --- a/commafeed-client/src/locales/de/messages.po +++ b/commafeed-client/src/locales/de/messages.po @@ -727,6 +727,10 @@ msgstr "Seiten teilen" msgid "Shift" msgstr "Verschiebung" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/en/messages.po b/commafeed-client/src/locales/en/messages.po index db596ee7..fcaaee1e 100644 --- a/commafeed-client/src/locales/en/messages.po +++ b/commafeed-client/src/locales/en/messages.po @@ -727,6 +727,10 @@ msgstr "Sharing sites" msgid "Shift" msgstr "Shift" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "Show confirmation when marking all entries as read" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "Show entry menu (desktop)" diff --git a/commafeed-client/src/locales/es/messages.po b/commafeed-client/src/locales/es/messages.po index bead5a57..5359ab70 100644 --- a/commafeed-client/src/locales/es/messages.po +++ b/commafeed-client/src/locales/es/messages.po @@ -727,6 +727,10 @@ msgstr "Compartir sitios" msgid "Shift" msgstr "Cambio" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/fa/messages.po b/commafeed-client/src/locales/fa/messages.po index 867806b2..05a75d4a 100644 --- a/commafeed-client/src/locales/fa/messages.po +++ b/commafeed-client/src/locales/fa/messages.po @@ -727,6 +727,10 @@ msgstr "اشتراک گذاری سایت ها" msgid "Shift" msgstr "شیفت" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/fi/messages.po b/commafeed-client/src/locales/fi/messages.po index ce042693..1bc85e34 100644 --- a/commafeed-client/src/locales/fi/messages.po +++ b/commafeed-client/src/locales/fi/messages.po @@ -727,6 +727,10 @@ msgstr "Sivustojen jakaminen" msgid "Shift" msgstr "Vaihto" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/fr/messages.po b/commafeed-client/src/locales/fr/messages.po index 5d8f83fc..f52b7f34 100644 --- a/commafeed-client/src/locales/fr/messages.po +++ b/commafeed-client/src/locales/fr/messages.po @@ -727,6 +727,10 @@ msgstr "Sites de partage" msgid "Shift" msgstr "Maj" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "Afficher les options de l'entrée (ordinateur)" diff --git a/commafeed-client/src/locales/gl/messages.po b/commafeed-client/src/locales/gl/messages.po index 0630e27f..49471bf7 100644 --- a/commafeed-client/src/locales/gl/messages.po +++ b/commafeed-client/src/locales/gl/messages.po @@ -727,6 +727,10 @@ msgstr "Compartir sitios" msgid "Shift" msgstr "quendas" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/hu/messages.po b/commafeed-client/src/locales/hu/messages.po index a4aee6fa..7ff3eb7e 100644 --- a/commafeed-client/src/locales/hu/messages.po +++ b/commafeed-client/src/locales/hu/messages.po @@ -727,6 +727,10 @@ msgstr "Webhelyek megosztása" msgid "Shift" msgstr "" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/id/messages.po b/commafeed-client/src/locales/id/messages.po index 8394857b..207c39d5 100644 --- a/commafeed-client/src/locales/id/messages.po +++ b/commafeed-client/src/locales/id/messages.po @@ -727,6 +727,10 @@ msgstr "Berbagi situs" msgid "Shift" msgstr "Pergeseran" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/it/messages.po b/commafeed-client/src/locales/it/messages.po index 51900551..4547b6bf 100644 --- a/commafeed-client/src/locales/it/messages.po +++ b/commafeed-client/src/locales/it/messages.po @@ -727,6 +727,10 @@ msgstr "Condivisione di siti" msgid "Shift" msgstr "Cambio" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/ja/messages.po b/commafeed-client/src/locales/ja/messages.po index f42fe8b9..33b51289 100644 --- a/commafeed-client/src/locales/ja/messages.po +++ b/commafeed-client/src/locales/ja/messages.po @@ -727,6 +727,10 @@ msgstr "共有サイト" msgid "Shift" msgstr "シフト" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/ko/messages.po b/commafeed-client/src/locales/ko/messages.po index 9fcd34d2..bc4f1e40 100644 --- a/commafeed-client/src/locales/ko/messages.po +++ b/commafeed-client/src/locales/ko/messages.po @@ -727,6 +727,10 @@ msgstr "사이트 공유" msgid "Shift" msgstr "시프트" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/ms/messages.po b/commafeed-client/src/locales/ms/messages.po index 4a8a85e8..f3bedf9e 100644 --- a/commafeed-client/src/locales/ms/messages.po +++ b/commafeed-client/src/locales/ms/messages.po @@ -727,6 +727,10 @@ msgstr "Berkongsi tapak" msgid "Shift" msgstr "Anjakan" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/nb/messages.po b/commafeed-client/src/locales/nb/messages.po index 552d0763..36fa20a9 100644 --- a/commafeed-client/src/locales/nb/messages.po +++ b/commafeed-client/src/locales/nb/messages.po @@ -727,6 +727,10 @@ msgstr "Delingssider" msgid "Shift" msgstr "Skift" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/nl/messages.po b/commafeed-client/src/locales/nl/messages.po index 34e35323..696e8710 100644 --- a/commafeed-client/src/locales/nl/messages.po +++ b/commafeed-client/src/locales/nl/messages.po @@ -727,6 +727,10 @@ msgstr "Sites delen" msgid "Shift" msgstr "" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/nn/messages.po b/commafeed-client/src/locales/nn/messages.po index c534b780..520cd667 100644 --- a/commafeed-client/src/locales/nn/messages.po +++ b/commafeed-client/src/locales/nn/messages.po @@ -727,6 +727,10 @@ msgstr "Delingssider" msgid "Shift" msgstr "Skift" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/pl/messages.po b/commafeed-client/src/locales/pl/messages.po index d985d6cf..207096ad 100644 --- a/commafeed-client/src/locales/pl/messages.po +++ b/commafeed-client/src/locales/pl/messages.po @@ -727,6 +727,10 @@ msgstr "Udostępnianie witryn" msgid "Shift" msgstr "zmiana" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/pt/messages.po b/commafeed-client/src/locales/pt/messages.po index 9eba4f6d..515f4e08 100644 --- a/commafeed-client/src/locales/pt/messages.po +++ b/commafeed-client/src/locales/pt/messages.po @@ -727,6 +727,10 @@ msgstr "Compartilhando sites" msgid "Shift" msgstr "Mudar" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/ru/messages.po b/commafeed-client/src/locales/ru/messages.po index eaa688bd..a97fbd66 100644 --- a/commafeed-client/src/locales/ru/messages.po +++ b/commafeed-client/src/locales/ru/messages.po @@ -727,6 +727,10 @@ msgstr "Обмен сайтами" msgid "Shift" msgstr "Сдвиг" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/sk/messages.po b/commafeed-client/src/locales/sk/messages.po index 1edf8ad2..f14c2e9f 100644 --- a/commafeed-client/src/locales/sk/messages.po +++ b/commafeed-client/src/locales/sk/messages.po @@ -727,6 +727,10 @@ msgstr "Zdieľanie stránok" msgid "Shift" msgstr "Smena" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/sv/messages.po b/commafeed-client/src/locales/sv/messages.po index c9862ca9..5648f351 100644 --- a/commafeed-client/src/locales/sv/messages.po +++ b/commafeed-client/src/locales/sv/messages.po @@ -727,6 +727,10 @@ msgstr "Delningssajter" msgid "Shift" msgstr "Skift" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/tr/messages.po b/commafeed-client/src/locales/tr/messages.po index 215b1983..866db33b 100644 --- a/commafeed-client/src/locales/tr/messages.po +++ b/commafeed-client/src/locales/tr/messages.po @@ -727,6 +727,10 @@ msgstr "Siteleri paylaşma" msgid "Shift" msgstr "Vardiya" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" diff --git a/commafeed-client/src/locales/zh/messages.po b/commafeed-client/src/locales/zh/messages.po index d24728ec..67a95086 100644 --- a/commafeed-client/src/locales/zh/messages.po +++ b/commafeed-client/src/locales/zh/messages.po @@ -727,6 +727,10 @@ msgstr "共享站点" msgid "Shift" msgstr "换档" +#: src/components/settings/DisplaySettings.tsx +msgid "Show confirmation when marking all entries as read" +msgstr "" + #: src/components/KeyboardShortcutsHelp.tsx msgid "Show entry menu (desktop)" msgstr "" 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 9d22bb96..1ee4e46a 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 @@ -66,6 +66,7 @@ public class UserSettings extends AbstractModel { private int scrollSpeed; private boolean alwaysScrollToEntry; + private boolean markAllAsReadConfirmation; private boolean email; private boolean gmail; 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 c3823a7b..3902e4f5 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 @@ -38,6 +38,9 @@ public class Settings implements Serializable { @ApiModelProperty(value = "always scroll selected entry to the top of the page, even if it fits entirely on screen", required = true) private boolean alwaysScrollToEntry; + @ApiModelProperty(value = "ask for confirmation when marking all entries as read", required = true) + private boolean markAllAsReadConfirmation; + @ApiModelProperty(value = "sharing settings", required = true) private SharingSettings sharingSettings = new SharingSettings(); 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 2531fa6e..d2c738b7 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 @@ -104,6 +104,7 @@ public class UserREST { s.setLanguage(settings.getLanguage()); s.setScrollSpeed(settings.getScrollSpeed()); s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry()); + s.setMarkAllAsReadConfirmation(settings.isMarkAllAsReadConfirmation()); } else { s.setReadingMode(ReadingMode.unread.name()); s.setReadingOrder(ReadingOrder.desc.name()); @@ -122,6 +123,7 @@ public class UserREST { s.setLanguage("en"); s.setScrollSpeed(400); s.setAlwaysScrollToEntry(false); + s.setMarkAllAsReadConfirmation(true); } return Response.ok(s).build(); } @@ -148,6 +150,7 @@ public class UserREST { s.setLanguage(settings.getLanguage()); s.setScrollSpeed(settings.getScrollSpeed()); s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry()); + s.setMarkAllAsReadConfirmation(settings.isMarkAllAsReadConfirmation()); s.setEmail(settings.getSharingSettings().isEmail()); s.setGmail(settings.getSharingSettings().isGmail()); diff --git a/commafeed-server/src/main/resources/changelogs/db.changelog-3.9.xml b/commafeed-server/src/main/resources/changelogs/db.changelog-3.9.xml new file mode 100644 index 00000000..ddf05466 --- /dev/null +++ b/commafeed-server/src/main/resources/changelogs/db.changelog-3.9.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/commafeed-server/src/main/resources/migrations.xml b/commafeed-server/src/main/resources/migrations.xml index dbcf0800..65948d13 100644 --- a/commafeed-server/src/main/resources/migrations.xml +++ b/commafeed-server/src/main/resources/migrations.xml @@ -21,5 +21,6 @@ + \ No newline at end of file