nextcloud / nextcloud/mail

Moving drafts back and forth when closing

Open
#13,283 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
  1. Open a Draft
  2. Do nothing (no changes, no modifications)
  3. Close Draft
Expected behavior

Nothing happens.

Actual behavior

Apparently nothing happens, but the Draft is anyway processed to local copy + move to IMAP even if totally unnecessary. This produce some unpleasant reloading effect in the view.

Mail app version

5.10

Nextcloud version

No response

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Nextcloud memory caching

No response

Web server

None

Database

None

Additional info

The issue mostly lies in NewMessageModal: this.changed is always set to true as a mere effect of initing the body of the draft (in Composer), and this will trigger the whole local copy + move to IMAP process in onClose()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in NewMessageModal and Composer, focusing on how draft-body initialization sets this.changed and how onClose uses it. Reproduce the unchanged-draft flow, then verify that closing without edits no longer triggers the local-copy and IMAP-move process while edited drafts retain their existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.