Skip to content

feat(ui): Add option to disable auto mark as read#13168

Open
SoleroTG wants to merge 1 commit into
nextcloud:mainfrom
SoleroTG:feat/disable-auto-read
Open

feat(ui): Add option to disable auto mark as read#13168
SoleroTG wants to merge 1 commit into
nextcloud:mainfrom
SoleroTG:feat/disable-auto-read

Conversation

@SoleroTG

@SoleroTG SoleroTG commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #13061

Summary

This Pull Request introduces a user preference option to fully disable the "auto mark as read" feature when opening a message in Nextcloud Mail (#13061). When disabled, viewing/skimming messages does not automatically change their status to read, making "mark as read" an explicitly manual action.

Key Changes

  1. Settings Switch: Added an option switch labeled "Automatically mark messages as read when opened" in the App Settings Menu under the "Messages" section.
  2. Preference Storage: Registered auto-mark-as-read user preference key, integrated it into the backend PHP initial state payload (PageController), and synced it with the frontend Vue Pinia store state on application bootstrap (init.js).
  3. Seen Timer Check: Modified the timing logic in ThreadEnvelope.vue (fetchMessage()) to retrieve and check the value of auto-mark-as-read (defaulting to true) before starting the 2000ms delay timer that toggles the envelope to seen.

How to Test

  1. Compile front-end changes (npm run dev or npm run watch).
  2. Open Nextcloud Mail.
  3. Open Mail settings -> Messages.
  4. Disable the toggle: "Automatically mark messages as read when opened".
  5. Select/click an unread message in the envelope list.
  6. Verify that:
    • The message loads and displays its body.
    • The message remains unread (no timer is started, no seen flag is sent to the server).
    • Reloading the page persists the disabled toggle and state correctly.
  7. Enable the toggle and verify that opening an unread message automatically marks it as read after the standard 2-second delay.

Checklist

  • Code passes linting (npm run lint and composer run cs:check)
  • Unit tests pass successfully (npm run test:unit)
  • Signed-off commits (DCO check compliant)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

CC: @GretaD (as you previously expressed interest in this feature/discussion)

@ChristophWurst

Copy link
Copy Markdown
Member

Thank you for the contribution!

@ChristophWurst

Copy link
Copy Markdown
Member

@nimishavijay small decision needed. Our friends have a setting for this as well but with a few options

image

(excuse the German UI, you get the idea 🙊)

Should we keep it binary (on vs off) or also offer a few options like off, instant, 3 seconds and 30 seconds?

Signed-off-by: SoleroTG <github-29h@solero.quietmail.eu>
@SoleroTG SoleroTG force-pushed the feat/disable-auto-read branch from 093040c to 97bb494 Compare June 26, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to fully disable "auto mark as read" when opening a message

2 participants