Moving drafts back and forth when closing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
- Open a Draft
- Do nothing (no changes, no modifications)
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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