Ticket #1020 (new bug)

Opened 19 months ago

Last modified 3 months ago

No save alert message for a changed draft mail. (easy)

Reported by: kaoutsis Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Mail Version: R1 development
Cc: ksmith Blocked By:
Platform: All Blocking:

Description

Open BeMail and create a new mail. Fill <To> Fill <Subject> with foo (or anything you like). Write a line to the body text. Then File => Save as Draft Close BeMail.

Go to the Deskbar right click to the mail icon Go Open Draft select foo add a line to the main body text, and Close BeMail (click to the yellow button of the window manager) No save alert message. Open again the foo email the last line you had added is missing.

Attachments

Mail.cpp.diff (1.1 kB) - added by kaoutsis 18 months ago.
posible fix
Mail.cpp.2.diff (292 bytes) - added by ksmith 13 months ago.
Fix for bug as discussed in comments.

Change History

in reply to: ↑ description   Changed 18 months ago by kaoutsis

Replying to kaoutsis: Correcting the description: Open BeMail and creat a new mail. Fill <To> Fill <Subject> with foo Write a line to the body text. Then File => Save as Draft Close BeMail.

Go to the Deskbar right click to the mail icon Go Open Draft select foo add a line to the main body text, Then File => Save as Draft. Add an other line. This time close BeMail by clicking to the yellow button of the window manager. No save alert message. Open again the foo email the last line you have added is missing.

Changed 18 months ago by kaoutsis

posible fix

  Changed 18 months ago by kaoutsis

Please ignore the patch, since i introduced an other bug, and i must dig further.

  Changed 16 months ago by wkornewald

  • summary changed from No save alert message for a changed draft mail. to No save alert message for a changed draft mail. (easy)

follow-up: ↓ 5   Changed 13 months ago by ksmith

  • cc ksmith added

I am unable to recreate this bug. It is properly asking me if I want to re-save the draft if I change it and close. Perhaps this has already been fixed?

in reply to: ↑ 4   Changed 13 months ago by kaoutsis

Replying to ksmith:

I am unable to recreate this bug. It is properly asking me if I want to re-save the draft if I change it and close. Perhaps this has already been fixed?

tested again with r21691, i did the following: Open Mail; write a line; File => Save as Draft; write a second line; File => Save as Draft; add a third line; Close the Mail app (no alert message); open the draft mail; third line is missing:)

follow-up: ↓ 7   Changed 13 months ago by ksmith

ok, I was able to re-create the bug.

At the end of SaveAsDraft(), we are setting fSent to true. This never gets reset to false when you change text anywhere in the email. Since this remains true, we don't satisfy the conditions in the if statement of QuitRequested(). Setting fSent to false in the case Field_CHANGED of the MessageReceived() seems to fix this bug. However, I am not sure if this would introduce any other bugs.

in reply to: ↑ 6   Changed 13 months ago by kaoutsis

Replying to ksmith:

ok, I was able to re-create the bug. At the end of SaveAsDraft(), we are setting fSent to true. This never gets reset to false when you change text anywhere in the email. Since this remains true, we don't satisfy the conditions in the if statement of QuitRequested(). Setting fSent to false in the case Field_CHANGED of the MessageReceived() seems to fix this bug. However, I am not sure if this would introduce any other bugs.

Now you give me an idea, we just have to do this: At the end of SaveAsDraft() we can change the fSent from true to false. After all is more logic (we just want to save and not to sent). Nothing more is needed. I already do that and after some tests, it looks like the bug indeed is fixed, the bug-fix is yours, and btw: welcome to the community:)

Changed 13 months ago by ksmith

Fix for bug as discussed in comments.

  Changed 9 months ago by modeenf

Have any one checked this diff?

  Changed 3 months ago by kaoutsis

pending patch: Mail.cpp.2.diff from 26/07/07

Note: See TracTickets for help on using tickets.